Compare commits

...

94 Commits

Author SHA1 Message Date
whyneedname d31d2433fe Merge branch 'landong' into home_hotList 2 years ago
ld0104 404ab49b40 首页接口统一,活动,普通,评测商品详情页添加分享朋友圈功能,会员中心会员等级数据调整 2 years ago
ld0104 1f42ec4258 域名修改 2 years ago
ld0104 c88cc3693d 用户会员页面UI调整 2 years ago
ld0104 20dee5a3cf 活动页面增加评价入口 2 years ago
ld0104 8651a0220b 活动UI调整 2 years ago
ld0104 a942d23222 秒杀活动,商品详情UI样式修改 2 years ago
ld0104 226cc79a93 首页榜单跳转热门榜单不显示,订单详情优惠券UI修改 2 years ago
ld0104 f9b1e67473 首页热门榜单跳转调整 2 years ago
ld0104 cb12655c12 修复使用优惠券弹窗UI 2 years ago
ld0104 b2b883b0ed 领券中心,我的券包增加商品专用券,首页榜单跳转热门榜单页面 2 years ago
ld0104 e53f337133 热门榜单修复子榜单无法显示全部 2 years ago
ld0104 31c2123e70 发起拼团,砍价订阅推送,首页跳转领券UI调整 2 years ago
ld0104 8b3314f433 热门榜单增加全部选项,评价图片文字非必选,首页活动轮播,秒杀修改 2 years ago
ld0104 77464009ee 首页活动跳转修改,砍价成功弹窗, 2 years ago
whyneedname 8d9107c6d1 热门榜单商品购买人数显示处理 2 years ago
ld0104 13b0fad4c6 Merge branch 'sxx' into landong 2 years ago
ld0104 1627f67cbe 首页UI调整,搜索页输入直接搜索跳转的页面可以继续进行搜索 2 years ago
whyneedname c2cfef9da4 热门榜单调整、价格排序 2 years ago
whyneedname 5c0b14a348 热门榜单接口对接 2 years ago
whyneedname d79e465b81 Merge branch 'sxx' into home_hotList 2 years ago
whyneedname 1b7142507c 砍价bug;绑定手机号按钮边框问题 2 years ago
whyneedname 6c2e4c53e9 品牌馆滚动条信息;收藏页布局逻辑调整;活动专区轮播图 2 years ago
whyneedname a9a549119c 个人资料 2 years ago
whyneedname d64de6abd0 品牌介绍字体大小调整;商品详情删除商品展示标题;动态显示邮费、无理由、保价信息 2 years ago
whyneedname 30989c2a33 热门榜单商品列表 2 years ago
whyneedname 4ed07a15af Merge branch 'sxx' into home_hotList 2 years ago
whyneedname 58b4c07fce 领取优惠券时调起订阅消息 2 years ago
whyneedname 439e676972 热门榜单页 2 years ago
whyneedname ade8c79e8e 活动页面布局逻辑调整 2 years ago
ld0104 988425c175 Merge branch 'sxx' into landong 2 years ago
ld0104 a3686c8389 秒杀文本提示弹窗 2 years ago
whyneedname 14dfd485f4 商品列表搜索框ui兼容;搜索页搜索输入完成直接搜索;专家ui间距调整 2 years ago
whyneedname 391abf8c02 Merge branch 'landong' into sxx 2 years ago
whyneedname ef20f5370c 活动商品详情富文本使用mp-html组件 2 years ago
ld0104 0bb30cba08 Merge branch 'sxx' into landong 2 years ago
ld0104 8db037c936 我的券包,订单初始样式,秒杀专区提示弹窗 2 years ago
whyneedname 2f6f257030 商品详情品牌头像边框偏移问题 2 years ago
whyneedname f3cb25ad9d 砍价分享弹框分享返回页面后自动关闭 2 years ago
whyneedname c3daaa877d 用户头像上传问题 2 years ago
whyneedname 9b004ec317 首页测评滑动样式修改;签到天数小于4位数前面加0;商品详情页评价图片样式问题 2 years ago
whyneedname 8c1e552e83 拼团、砍价详情增加下拉刷新;品牌详情品牌头像圆角位置边宽问题 2 years ago
whyneedname fca73b56fa 普通、积分商品详情商品参数 2 years ago
whyneedname 153abbb4b3 已签到未拦截;删除甄选评测介绍标题 2 years ago
whyneedname afbb306958 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname 49ee88b792 签到成功增加弹框提示 2 years ago
ld0104 ea1c7a2cf8 Merge branch 'sxx' into landong 2 years ago
ld0104 07774f9478 我的券包已领券去使用跳转 2 years ago
whyneedname c9b04ed404 商品规格显示问题 2 years ago
whyneedname ca6dd16c1e 券左边样式显示问题;富文本a链接颜色、遮罩层颜色修改; 2 years ago
whyneedname 66ecdc3bc9 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
ld0104 2e13124c2d 评测,足迹样式修改 2 years ago
whyneedname 66b7af52d9 个人信息生日完善问题;测评列表标题修改;积分跳转页面调整;普通、积分、秒杀、拼团商品详情富文本调整 2 years ago
ld0104 0e291bed07 修改冲突内容 2 years ago
ld0104 a539a565d7 Merge branch 'sxx' into landong 2 years ago
whyneedname be9c8443aa Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
ld0104 94d3e04045 我的足迹,评测页面 2 years ago
whyneedname 9f0b26c151 所有卡片、板块阴影透明度由15变为6 2 years ago
whyneedname 210a96861d 我的页增加足迹入口;登录逻辑调整 2 years ago
whyneedname 22a40c4190 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname 78be642c0b 我的券包布局调整;首页商品列表兼容积分商品;商品详情解决图片间隙问题、详情增加边距 2 years ago
ld0104 f18353fcfb 全部品牌页面修改 2 years ago
whyneedname cecb9499a4 品牌详情介绍展示不全;商品详情规格切换数量未改变 2 years ago
whyneedname 6e5baa2130 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname e8ad7b2d9f 会员等级成长值;售后添加联系方式;售后列表ui调整 2 years ago
ld0104 9cd296220a 完善评测收藏 2 years ago
whyneedname 6388e35bf1 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
ld0104 90b0765115 我的券包调接口 2 years ago
whyneedname cfdca2e3cb 商品评论;售后;图片上传问题 2 years ago
ld0104 5b5c7a20ff Merge branch 'sxx' into landong 2 years ago
ld0104 67613a6c23 评测 2 years ago
whyneedname 72b99cd965 取消订单的ui兼容 2 years ago
whyneedname ab577b80df 物流详情 2 years ago
whyneedname 62fe7dcc26 结算页地址、优惠券弹框和选中显示;砍价转发打开空白处理 2 years ago
whyneedname 7a07aadf5e 客服、联系专家按钮链接企微客服;优惠券领取问题 2 years ago
ld0104 2b8e103dc7 Merge branch 'sxx' into landong 2 years ago
ld0104 a7aca93c9b Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into landong 2 years ago
ld0104 bb1d32a20c 调轮播图,常见问题,关于我们页面接口 2 years ago
whyneedname 36bba74ea9 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname 4583f86861 拼团砍价、我的订单ui调整;分类商品列表修改;商品详情词条弹框;购物车失效商品 2 years ago
ld0104 f07a4f11b7 Merge branch 'sxx' into landong 2 years ago
ld0104 8b42cdeaa1 测评收藏 2 years ago
whyneedname 05877e2ad7 Merge branch 'landong' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname c356a3569c 个人拼团详情;砍价商品详情;个人砍价详情;活动专区详情 2 years ago
ld0104 5147033f40 修改 2 years ago
ld0104 20b2bf5be7 常见问题、关于我们页面 2 years ago
whyneedname b945ec8cfc Merge branch 'sxx' of https://git.lotus-wallet.com/Loki/zsw-farm-bxg into sxx 2 years ago
whyneedname d5cc5349ea 删除积分兑换页;签到页增加积分商品;售后详情;物流详情 2 years ago
ld0104 eaa6646644 Merge branch 'sxx' into landong 2 years ago
whyneedname 55392884c6 签到;签到记录;申请售后;售后列表 2 years ago
whyneedname f60f913aa6 测评详情;专家;首页商品列表切换形式调整 2 years ago
whyneedname 16d06531bc 增加测评详情,部分修改 2 years ago
whyneedname 8d992c9019 眼界 2 years ago
whyneedname 71a5f81f83 修改 2 years ago
  1. 15
      App.vue
  2. 10
      api/activity.js
  3. 26
      api/public.js
  4. 106
      api/store.js
  5. 49
      api/user.js
  6. 178
      assets/css/base.css
  7. 93
      assets/css/base.less
  8. 64
      assets/css/reset.css
  9. 2
      assets/css/reset.less
  10. 6159
      assets/css/style.css
  11. 6390
      assets/css/style.less
  12. 14
      components/CitySelect.vue
  13. 67
      components/CountDown.vue
  14. 73
      components/CouponListWindow.vue
  15. 1
      components/Loading.vue
  16. 21
      components/OrderGoods.vue
  17. 33
      components/ProductConSwiper.vue
  18. 50
      components/ProductWindow.vue
  19. 325
      components/PromotionGood.vue
  20. 18
      components/Recommend.vue
  21. 110
      components/Tabbar.vue
  22. 44
      components/UserEvaluation.vue
  23. 43
      components/colorui/components/cu-custom.vue
  24. 32
      components/uni-notice-bar/uni-notice-bar.vue
  25. 4
      components/uni-popup/uni-popup.vue
  26. 8
      config/index.js
  27. 3
      libs/order.js
  28. 13
      manifest.json
  29. 209
      pages.json
  30. 6
      pages/Loading/index.vue
  31. 652
      pages/activity/DargainDetails/index.vue
  32. 537
      pages/activity/DargainGoodsDetails/index.vue
  33. 1195
      pages/activity/GroupDetails/index.vue
  34. 1210
      pages/activity/GroupRule/index.vue
  35. 1146
      pages/activity/SeckillDetails/index.vue
  36. 697
      pages/activity/activity/index.vue
  37. 20
      pages/authorization/index.vue
  38. 166
      pages/expert/index.vue
  39. 59
      pages/home/components/Banner.vue
  40. 568
      pages/home/components/HotCommodity.vue
  41. 428
      pages/home/components/ProductsRecommended.vue
  42. 2141
      pages/home/index.vue
  43. 1185
      pages/home/index1.vue
  44. 260
      pages/order/GoodsReturn/index.vue
  45. 506
      pages/order/Logistics/index.vue
  46. 403
      pages/order/MyOrder/index.vue
  47. 283
      pages/order/OrderDetails/index.vue
  48. 891
      pages/order/OrderReturnDetail/index.vue
  49. 460
      pages/order/OrderSubmission/index.vue
  50. 165
      pages/order/ReturnList/index.vue
  51. 438
      pages/order/ReturnList/listItem.vue
  52. 239
      pages/shop/EvaluateList/index.vue
  53. 522
      pages/shop/Evaluations/EvaluationDetail/index.vue
  54. 117
      pages/shop/Evaluations/index.vue
  55. 119
      pages/shop/GoodSearch/index.vue
  56. 407
      pages/shop/GoodsClass/index.vue
  57. 580
      pages/shop/GoodsCollection/index.vue
  58. 2324
      pages/shop/GoodsCon/index.vue
  59. 244
      pages/shop/GoodsEvaluate/index.vue
  60. 318
      pages/shop/GoodsFoot/index.vue
  61. 269
      pages/shop/GoodsList/index.vue
  62. 654
      pages/shop/HotNewGoods/index.vue
  63. 280
      pages/shop/IntegralGoodsCon/index.vue
  64. 959
      pages/shop/ShoppingCart/index.vue
  65. 267
      pages/shop/brands/brandAll/index.vue
  66. 340
      pages/shop/brands/brandDetail/index.vue
  67. 428
      pages/shop/brands/index.vue
  68. 92
      pages/user/AboutUs/index.vue
  69. 638
      pages/user/PersonalData/index.vue
  70. 135
      pages/user/Problem/index.vue
  71. 690
      pages/user/User/index.vue
  72. 288
      pages/user/UserVip/index.vue
  73. 125
      pages/user/address/AddAddress/index.vue
  74. 424
      pages/user/address/AddressManagement/index.vue
  75. 582
      pages/user/coupon/GetCoupon/index.vue
  76. 454
      pages/user/coupon/UserCoupon/index.vue
  77. 89
      pages/user/signIn/Integral/index.vue
  78. 373
      pages/user/signIn/Sign/index.vue
  79. 37
      pages/user/signIn/SignRecord/index.vue
  80. BIN
      static/icon-cart-hot.png
  81. BIN
      static/icon-cart.png
  82. BIN
      static/icon-class-hot.png
  83. BIN
      static/icon-class.png
  84. BIN
      static/icon-home-hot.png
  85. BIN
      static/icon-home.png
  86. BIN
      static/icon-user-hot.png
  87. BIN
      static/icon-user.png
  88. BIN
      static/images/Q&A.png
  89. BIN
      static/images/about-us.png
  90. BIN
      static/images/add-addr.png
  91. BIN
      static/images/add-btn.png
  92. BIN
      static/images/back-btn.png
  93. BIN
      static/images/bj.png
  94. BIN
      static/images/by.png
  95. BIN
      static/images/camera.png
  96. BIN
      static/images/cart-icon.png
  97. BIN
      static/images/check-circle.png
  98. BIN
      static/images/close.png
  99. BIN
      static/images/coupon-bg.png
  100. BIN
      static/images/coupon-bg2.png
  101. Some files were not shown because too many files have changed in this diff Show More

15
App.vue

@ -3,8 +3,10 @@ import Vue from 'vue'
// #ifdef H5
var VConsole = require('@/utils/vconsole.min.js')
// #endif
import { login } from '@/utils'
export default {
onLaunch: function () {
uni.hideTabBar();
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
//
@ -33,7 +35,12 @@ export default {
})
},
onShow: function () {
uni.hideTabBar();
console.log('App Show')
if (!this.$store.getters.token) {
console.log('进行login操作');
login().finally(() => {})
}
},
onHide: function () {
console.log('App Hide')
@ -52,6 +59,7 @@ export default {
return new Promise((resolve, reject) => {
uni.getSystemInfo({
success: function (e) {
Vue.prototype.addBottom = e.safeArea.top > 20;
Vue.prototype.StatusBar = e.statusBarHeight
// #ifdef H5
Vue.prototype.CustomBar = e.statusBarHeight + 45
@ -66,9 +74,10 @@ export default {
// #endif
// #ifdef MP-WEIXIN
let custom = wx.getMenuButtonBoundingClientRect()
Vue.prototype.Custom = custom
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight
let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBarLeft = custom.left;
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
// #endif
},
})

10
api/activity.js

@ -4,7 +4,13 @@ import request from "@/utils/request";
* 拼团列表
*/
export function getCombinationList(data) {
return request.get("/combination/list", data, { login: false });
return request.get("/combination/list", data, { login: true });
}
/**
* 已发起拼团列表
*/
export function getUserCombinationList(data) {
return request.get("/userCombination/list", data, { login: true });
}
/**
@ -64,7 +70,7 @@ export function getSeckillDetail(id) {
* @param {*} data
*/
export function getBargainList(data) {
return request.get("/bargain/list", data, { login: false });
return request.get("/bargain/list", data, { login: true });
}
/**

26
api/public.js

@ -5,6 +5,7 @@ import request from "@/utils/request";
* @returns {*}
*/
export function getHomeData() {
// return request.get("index", {}, { login: true });
return request.get("index", {}, { login: false });
}
@ -16,6 +17,23 @@ export function getCanvas() {
return request.get("/getCanvas?terminal=3", {}, { login: false });
}
/**
* 热门榜单
* @returns {*}
*/
export function getHotList() {
return request.get("/hotList", {}, { login: false });
}
/**
* 首页热门榜单
* @returns {*}
*/
export function getIndexHotList() {
return request.get("/indexHotList", {}, { login: false });
}
/**
* 文章 轮播列表
* @returns {*}
@ -106,3 +124,11 @@ export function imageBase64(image, code) {
{ login: false }
);
}
/**
* 获取专家列表
* @returns {*}
*/
export function getExpert() {
return request.get("/expert", {}, { login: false });
}

106
api/store.js

@ -1,4 +1,13 @@
import request from "@/utils/request";
/**
* 获取各类轮播图
*
*/
export function getBanner(type) {
return request.get("/menu/banner/"+type,{}, { login: false });
}
/*
* 商品分类
@ -134,6 +143,7 @@ export function changeCartNum(id, number) {
*/
export function getSearchKeyword() {
return request.get("/search/keyword", {}, {
// login: true
login: false
});
}
@ -171,6 +181,7 @@ export function postOrderProduct(unique) {
* 提交评价页面
*/
export function postOrderComment(data) {
console.log(11111);
return request.post("/order/comment", data, {
login: true
});
@ -181,3 +192,98 @@ export function storeListApi(data) {
login: false
});
}
/**
* 测评列表
*/
export function getEvaluation() {
return request.get("/evaluation", {}, {
login: false
});
}
/**
* 测评详情
*/
export function getEvaluationDetail(id) {
return request.get("/evaluation/"+id, {}, {
login: true
});
}
/**
* 品牌列表/brandByName
*/
export function getBrands() {
return request.get("/brand", {}, {
login: false
});
}
/**
* 商品品牌列表
*/
export function getBrandByName() {
return request.get("/brandByName", {}, {
login: false
});
}
/**
* 添加收藏
*
*/
export function getUserCollection(data) {
return request.post("/collectEvaluation/add",data);
}
/**
*
* 删除收藏
*/
export function delUserCollection(data) {
return request.post("/collectEvaluation/del", data);
}
/**
* 品牌详情
*/
export function getBrandDetail(id) {
return request.get("/brand/"+id, {}, {
login: false
});
}
/**
* 品牌馆滚动条信息
*/
export function getBrandNoticeInfo() {
return request.get("/brandInfo", {}, {
login: false
});
}
/**
* 词条名查询
*/
export function getEntry(data) {
return request.get("/entryByName", data, {
login: false
});
}
/**
* 热门榜单
*/
export function getHotList(data) {
return request.get("/hotList", data, {
login: false
});
}
/**
* 热门榜单信息
*/
export function getHotListData() {
return request.get("/hotListData", {}, {
login: false
});
}

49
api/user.js

@ -1,4 +1,5 @@
import request from '@/utils/request'
import { dataFormat } from '../utils'
/**
* 省市区
@ -66,6 +67,22 @@ export function registerReset(data) {
login: true,
})
}
/**
*
* 待领取优惠券
*/
export function getCanReceive(q) {
return request.get('/coupons/canReceive', q, {
login: true,
})
}
/**
*
* 已失效优惠券/coupons/userFailure/{type}
*/
export function getUserFailure(type) {
return request.get('/coupons/userFailure/'+type)
}
/*
* 领取优惠券列表
@ -195,6 +212,17 @@ export function getCollectUser(page, limit, type) {
type,
})
}
/**
*
* 获取评测收藏
*/
export function getCollectEvaluation(page, limit, type) {
return request.get('/collectEvaluation/user', {
page: page,
limit: limit,
type,
})
}
/*
* 删除收藏产品
@ -319,6 +347,13 @@ export function postCashInfo(cash) {
export function getVipInfo() {
return request.get('/user/level/grade')
}
/*
* 会员信息
* */
export function getVipInformation() {
return request.get('/userinfo')
}
/*
* 会员等级任务
@ -442,3 +477,17 @@ export function setDetection() {
export function getRechargeApi() {
return request.get('recharge/index')
}
/**
* 常见问题
*/
export function getProblem() {
return request.get('/menu/problem',{})
}
/**
* 关于我们
*/
export function getAboutUs() {
return request.get('/menu/aboutUs',{})
}

178
assets/css/base.css

@ -1,2 +1,176 @@
@charset "UTF-8";.font-color-red{color:#eb3729 !important}.bg-color-red{background-color:#eb3729 !important}.icon-color{color:#eb3729}.cart-color{color:#eb3729 !important;border:1px solid #eb3729 !important}.padding20{padding:20rpx}.pad20{padding:0 20rpx}.padding30{padding:30rpx}.pad30{padding:0 30rpx}.acea-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.acea-row.row-middle{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.acea-row.row-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.acea-row.row-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.acea-row.row-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-right{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.acea-row.row-left{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.acea-row.row-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-around{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column-around{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.acea-row.row-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.acea-row.row-column-between{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.acea-row.row-center-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.acea-row.row-between-wrapper{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.slider-banner{position:relative;width:100%;overflow:hidden}.slider-banner .swiper-container{height:100%}.slider-banner image{display:block;width:100%;height:100%}.start{width:122rpx;height:30rpx;background-image:url("https://wx.yixiang.co/static/images/start.png");background-repeat:no-repeat;-webkit-background-size:122rpx auto;background-size:122rpx auto}.start.star5{background-position:0 3rpx}.start.star4{background-position:0 -30rpx}.start.star3{background-position:0 -70rpx}.start.star2{background-position:0 -105rpx}.start.star1{background-position:0 -140rpx}.start.star0{background-position:0 -175rpx}.checkbox-wrapper{position:relative}.checkbox-wrapper input{display:none}.checkbox-wrapper .icon{position:absolute;left:0;top:50%;display:inline-block;width:18px;height:18px;border:1px solid #cccccc;-webkit-border-radius:50%;border-radius:50%;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%)}.checkbox-wrapper input:checked+.icon{background-color:#e93323;border-color:#e93323;background-image:url("https://wx.yixiang.co/static/images/enter.png");-webkit-background-size:21rpx 15rpx;background-size:21rpx 15rpx;background-repeat:no-repeat;background-position:center center}.Loads{height:80rpx;font-size:25rpx;color:#000}.Loads .iconfont{font-size:30rpx;margin-right:10rpx;height:32rpx;line-height:32rpx}@-webkit-keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.loadingpic{-webkit-animation:load 3s linear 1s infinite;animation:load 3s linear 1s infinite}.loading{-webkit-animation:load linear 1s infinite;animation:load linear 1s infinite}
/*# sourceMappingURL=./base.css.map */
@charset "UTF-8";
/**
*相关初始化
*/
.font-color-red {
color: #2DB5AE !important;
}
.bg-color-red {
background-color: #2DB5AE !important;
color: #ffffff !important;
}
.icon-color {
color: #2DB5AE;
}
.cart-color {
color: #2DB5AE !important;
border: 1px solid #2DB5AE !important;
}
/* padding20 */
.padding20 {
padding: 20rpx;
}
/* pad20 */
.pad20 {
padding: 0 20rpx;
}
/* padding30 */
.padding30 {
padding: 30rpx;
}
/*pad30 */
.pad30 {
padding: 0 30rpx;
}
/* layout */
.acea-row {
display: flex;
flex-wrap: wrap;
/* 辅助类 */
}
.acea-row.row-middle {
align-items: center;
}
.acea-row.row-top {
align-items: flex-start;
}
.acea-row.row-bottom {
align-items: flex-end;
}
.acea-row.row-center {
justify-content: center;
}
.acea-row.row-right {
justify-content: flex-end;
}
.acea-row.row-left {
justify-content: flex-start;
}
.acea-row.row-between {
justify-content: space-between;
}
.acea-row.row-around {
justify-content: space-around;
}
.acea-row.row-column-around {
flex-direction: column;
justify-content: space-around;
}
.acea-row.row-column {
flex-direction: column;
}
.acea-row.row-column-between {
flex-direction: column;
justify-content: space-between;
}
/* 上下左右垂直居中 */
.acea-row.row-center-wrapper {
align-items: center;
justify-content: center;
}
/* 上下两边居中对齐 */
.acea-row.row-between-wrapper {
align-items: center;
justify-content: space-between;
}
.acea-row.row-center-column {
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 轮播图 */
.slider-banner {
position: relative;
width: 100%;
/* height:750rpx; */
overflow: hidden;
}
.slider-banner .swiper-container {
height: 100%;
}
.slider-banner image {
display: block;
width: 100%;
height: 100%;
}
.start {
width: 122rpx;
height: 30rpx;
background-image: url("https://wx.yixiang.co/static/images/start.png");
background-repeat: no-repeat;
background-size: 122rpx auto;
}
.start.star5 {
background-position: 0 3rpx;
}
.start.star4 {
background-position: 0 -30rpx;
}
.start.star3 {
background-position: 0 -70rpx;
}
.start.star2 {
background-position: 0 -105rpx;
}
.start.star1 {
background-position: 0 -140rpx;
}
.start.star0 {
background-position: 0 -175rpx;
}
/* 单选框和多选框 */
.Loads {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
height: 80rpx;
}
.Loads .iconfont {
font-size: 30rpx;
margin-right: 10rpx;
height: 32rpx;
line-height: 32rpx;
}
/*加载动画*/
@keyframes load {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.loadingpic {
animation: load 3s linear 1s infinite;
}
.loading {
animation: load linear 1s infinite;
}
/* 多选框样式 */
checkbox .wx-checkbox-input {
width: 40rpx;
height: 40rpx;
border-radius: 50% !important;
color: #ffffff !important;
border: 2rpx solid #2DB5AE !important;
box-sizing: border-box;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: none !important;
color: #fff;
background: linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
font-size: 28rpx;
}

93
assets/css/base.less

@ -3,17 +3,18 @@
*相关初始化
*/
.font-color-red {
color: #eb3729 !important;
color: #2DB5AE !important;
}
.bg-color-red {
background-color: #eb3729 !important;
background-color: #2DB5AE !important;
color: #ffffff !important;
}
.icon-color {
color: #eb3729;
color: #2DB5AE;
}
.cart-color {
color: #eb3729 !important;
border: 1px solid #eb3729 !important;
color: #2DB5AE !important;
border: 1px solid #2DB5AE !important;
}
/* padding20 */
.padding20 {
@ -82,6 +83,11 @@
align-items: center;
justify-content: space-between;
}
.acea-row.row-center-column {
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 轮播图 */
.slider-banner {
@ -127,35 +133,37 @@
background-position: 0 -1.75*100rpx;
}
/* 单选框和多选框 */
.checkbox-wrapper {
position: relative;
}
.checkbox-wrapper input {
display: none;
}
.checkbox-wrapper .icon {
position: absolute;
left: 0;
top: 50%;
display: inline-block;
width: 18px;
height: 18px;
border: 1px solid #cccccc;
border-radius: 50%;
transform: translate(0, -50%);
}
.checkbox-wrapper input:checked + .icon {
background-color: #e93323;
border-color: #e93323;
background-image: url("https://wx.yixiang.co/static/images/enter.png");
background-size: 0.21*100rpx 0.15*100rpx;
background-repeat: no-repeat;
background-position: center center;
}
// .checkbox-wrapper {
// position: relative;
// }
// .checkbox-wrapper input {
// display: none;
// }
// .checkbox-wrapper .icon {
// position: absolute;
// left: 0;
// top: 50%;
// display: inline-block;
// width: 18px;
// height: 18px;
// border: 1px solid #cccccc;
// border-radius: 50%;
// transform: translate(0, -50%);
// }
// .checkbox-wrapper input:checked + .icon {
// background-color: #e93323;
// border-color: #e93323;
// background-image: url("https://wx.yixiang.co/static/images/enter.png");
// background-size: 0.21*100rpx 0.15*100rpx;
// background-repeat: no-repeat;
// background-position: center center;
// }
.Loads {
height: 0.8*100rpx;
font-size: 0.25*100rpx;
color: #000;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
height: 80rpx;
}
.Loads .iconfont {
font-size: 0.3*100rpx;
@ -178,3 +186,22 @@
.loading {
animation: load linear 1s infinite;
}
/* 多选框样式 */
checkbox .wx-checkbox-input {
width: 40rpx;
height: 40rpx;
border-radius: 50% !important;
color: #ffffff !important;
border: 2rpx solid #2DB5AE !important;
box-sizing: border-box;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: none !important;
color: #fff;
// background: #9FCD69;
background: linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
font-size: 28rpx;
}

64
assets/css/reset.css

@ -1,2 +1,62 @@
input{line-height:normal;-webkit-box-sizing:border-box;box-sizing:border-box}@font-face{font-family:'GuildfordProBook 5';src:url('https://wx.yixiang.co/static/iconfont/GuildfordProBook5.otf')}[v-cloak]{display:none}.iconfont{font-size:36rpx}@media (-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5){.border-1px::after{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}.border-1px::before{-webkit-transform:scaleY(.7);-ms-transform:scaleY(.7);transform:scaleY(.7)}}@media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){.border-1px::after{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}.border-1px::before{-webkit-transform:scaleY(.5);-ms-transform:scaleY(.5);transform:scaleY(.5)}}@media (-webkit-min-device-pixel-ratio:3),(min-device-pixel-ratio:3){.border-1px::after{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}.border-1px::before{-webkit-transform:scaleY(.33);-ms-transform:scaleY(.33);transform:scaleY(.33)}}.line1{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;width:100%}.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5)}
/*# sourceMappingURL=./reset.css.map */
input {
line-height: normal;
box-sizing: border-box;
}
@font-face {
font-family: 'GuildfordProBook 5';
src: url('https://wx.yixiang.co/static/iconfont/GuildfordProBook5.otf');
}
[v-cloak] {
display: none;
}
.iconfont {
font-size: 36rpx;
}
/* 一像素边框 */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) {
.border-1px::after {
transform: scaleY(0.7);
}
.border-1px::before {
transform: scaleY(0.7);
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
.border-1px::after {
transform: scaleY(0.5);
}
.border-1px::before {
transform: scaleY(0.5);
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
.border-1px::after {
transform: scaleY(0.33);
}
.border-1px::before {
transform: scaleY(0.33);
}
}
.line1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.line2 {
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 55;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(10rpx);
}

2
assets/css/reset.less

@ -36,7 +36,7 @@ input{line-height: normal; box-sizing:border-box;}
}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 100%;}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5);}
.mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background: rgba(0, 0, 0, .6);backdrop-filter: blur(10rpx);}

6159
assets/css/style.css

File diff suppressed because one or more lines are too long

6390
assets/css/style.less

File diff suppressed because it is too large Load Diff

14
components/CitySelect.vue

@ -233,6 +233,7 @@ export default {
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
border-radius: 28rpx 28rpx 0rpx 0rpx;
.cityScroll {
height: 100%;
}
@ -248,8 +249,9 @@ export default {
width: 100%;
font-size: 30rpx;
text-align: center;
height: 95rpx;
line-height: 95rpx;
// height: 95rpx;
// line-height: 95rpx;
padding-top: 32rpx;
position: relative;
&:cityselect-title:after {
height: 1px;
@ -262,7 +264,7 @@ export default {
background-image: linear-gradient(0deg, #ececec 50%, transparent 0);
}
}
.cityselect-nav {
.cityselect-header .cityselect-nav {
width: 100%;
padding-left: 20rpx;
overflow: hidden;
@ -283,8 +285,8 @@ export default {
text-overflow: ellipsis;
max-width: 40%;
&.active {
color: #f23030 !important;
border-bottom: 1rpx solid #f23030;
color: #2DB5AE !important;
border-bottom: 1rpx solid #2DB5AE;
}
}
}
@ -308,7 +310,7 @@ export default {
font-size: 26rpx;
color: #333;
&.active{
color:#f23030 !important;
color:#2DB5AE !important;
}
&:after {
content: '';

67
components/CountDown.vue

@ -1,14 +1,14 @@
<template>
<view class="time">
{{ tipText }}
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt">{{ dayText }}</text>
<text class="styleAll">{{ hour }}</text>
<text class="timeTxt">{{ hourText }}</text>
<text class="styleAll">{{ minute }}</text>
<text class="timeTxt">{{ minuteText }}</text>
<text class="styleAll">{{ second }}</text>
<text class="timeTxt">{{ secondText }}</text>
<text class="styleAll" :style="styleAllStyle?styleAllStyle:''" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt" :style="timeTxtStyle?timeTxtStyle:''">{{ dayText }}</text>
<text class="styleAll" :style="styleAllStyle?styleAllStyle:''">{{ hour }}</text>
<text class="timeTxt" :style="timeTxtStyle?timeTxtStyle:''">{{ hourText }}</text>
<text class="styleAll" :style="styleAllStyle?styleAllStyle:''">{{ minute }}</text>
<text class="timeTxt" :style="timeTxtStyle?timeTxtStyle:''">{{ minuteText }}</text>
<text class="styleAll" :style="styleAllStyle?styleAllStyle:''" v-if="isSecond">{{ second }}</text>
<text class="timeTxt" :style="timeTxtStyle?timeTxtStyle:''" v-if="isSecond">{{ secondText }}</text>
</view>
</template>
<script>
@ -18,7 +18,7 @@ export default {
//
tipText: {
type: String,
default: '倒计时',
default: '',
},
dayText: {
type: String,
@ -41,6 +41,18 @@ export default {
type: Boolean,
default: true,
},
isSecond: {
type: Boolean,
default: true,
},
styleAllStyle: {
type: String,
default: '',
},
timeTxtStyle: {
type: String,
default: '',
}
},
data() {
return {
@ -66,17 +78,17 @@ export default {
},
methods: {
show_time() {
console.log(this.datatime)
console.log('this.datatime', this.datatime, 'this.time', this.time)
if (this.time.toString().length == 13) {
//
console.log('毫秒')
// console.log('')
this.time = this.time / 1000
} else if (this.time.toString().length == 10) {
console.log('秒')
// console.log('')
//
} else {
//
console.log('时间')
// console.log('')
this.time = Date.parse(this.time) / 1000
}
this.runTime()
@ -102,7 +114,11 @@ export default {
if (hour <= 9) hour = '0' + hour
if (minute <= 9) minute = '0' + minute
if (second <= 9) second = '0' + second
if(day) {
this.day = day
} else {
this.day = '00'
}
this.hour = hour
this.minute = minute
this.second = second
@ -119,3 +135,28 @@ export default {
}
}
</script>
<style lang="less" scoped>
.time {
.styleAll {
display: inline-block;
width: 42rpx;
height: 38rpx;
background: #2DB5AE;
border-radius: 4rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 38rpx;
text-align: center;
}
.timeTxt {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 60rpx;
height: 60rpx;
}
}
</style>

73
components/CouponListWindow.vue

@ -13,7 +13,36 @@
:key="coupon.id"
@click="click(coupon)"
>
<div class="money">
<image class="coupon-bg" src="@/static/images/coupon-bg.png" mode=""></image>
<view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box">
<view v-if="coupon.image.length>0" class="wrappers acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in coupon.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money" style="padding-top: 28rpx;">¥{{ coupon.couponPrice }}</view>
<!-- <view class="money">7<text></text></view> -->
<view class="line"></view>
<view class="tip acea-row row-between">
<!-- <view class="">{{coupon.ctype?'仅限定品牌可用':'全部商品可用'}}</view> -->
<view class="">{{coupon.cname}}</view>
<view v-if="coupon.endTime === 0">不限时</view>
<view v-else>到期时间{{ coupon.endTime }}</view>
</view>
</view>
</view>
<view class="coupon-right acea-row row-center-column">
<!-- <image v-if="item.isUse === true" class="tag" src="@/static/images/gotCoupon-icon.png" mode=""></image> -->
<view class="type">{{coupon.image.length>0? (coupon.couponPrice+'元'):'满减券' || '折扣券'}}</view>
<view class="tip">{{ coupon.useMinPrice }}可用</view>
<view class="iconfont icon-xuanzhong1 font-color-red" v-if="checked === coupon.id"></view>
<view class="iconfont icon-weixuanzhong" v-else></view>
<!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> -->
<!-- <view v-if="item.isUse === true" class="btn btn-white">已领取</view>
<view v-else-if="item.isUse === 2" class="btn btn-fail">已领完</view>
<view v-else class="btn" @click="getCoupon(item.id, index)">立刻领取</view> -->
</view>
<!-- <div class="money">
<div>
<span class="num">{{ coupon.couponPrice }}</span>
</div>
@ -30,7 +59,7 @@
></div>
<div class="iconfont icon-weixuanzhong" v-else></div>
</div>
</div>
</div> -->
</div>
</view>
<view class="couponNo bg-color-red" @click="couponNo">不使用优惠券</view>
@ -48,15 +77,45 @@
.coupon-list-window .iconfont {
font-size: 40rpx;
}
.coupon-list-window .coupon-list .item .coupon-left {
height: 208rpx;
.left-bg {
top: -2rpx;
left: 16rpx;
}
.text-box {
// padding-top: 28rpx;
padding-left: 32rpx;
padding-right: 30rpx;
.wrappers{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:12rpx 37rpx 12rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
}
.icon-weixuanzhong {
color: #999999;
}
.couponNo {
font-size: 30rpx;
font-size: 26rpx;
font-weight: bold;
color: #fff;
width: 690rpx;
height: 86rpx;
border-radius: 43rpx;
width: 686rpx;
height: 70rpx;
border-radius: 16rpx;
text-align: center;
line-height: 86rpx;
line-height: 70rpx;
margin: 60rpx auto;
}
</style>

1
components/Loading.vue

@ -8,6 +8,7 @@
上拉加载更多
</template>
</view>
<view class="Loads acea-row row-center-wrapper" v-else>没有更多啦</view>
</template>
<script>

21
components/OrderGoods.vue

@ -1,20 +1,27 @@
<template>
<view class="orderGoods">
<view class="total">{{ cartInfo.length }}件商品</view>
<view class="total">商品详情</view>
<!-- <view class="total">{{ cartInfo.length }}件商品</view> -->
<view class="goodWrapper">
<view class="item acea-row row-between-wrapper" v-for="cart in cartInfo" :key="cart.id">
<view class="item acea-row row-between" v-for="cart in cartInfo" :key="cart.id">
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="acea-row">
<view class="attr">{{ cart.productInfo.attrInfo.sku }}</view>
</view>
<view class="acea-row row-between-wrapper">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="money" v-if="isIntegral">{{ cart.costPrice }}积分</view>
<view class="money" v-else>{{ cart.truePrice }}</view>
<view class="num">x {{ cart.cartNum }}</view>
</view>
<view class="attr line1" v-if="cart.productInfo.attrInfo">{{ cart.productInfo.attrInfo.sku }}</view>
<view class="money font-color-red" v-if="isIntegral">{{ cart.costPrice }}积分</view>
<view class="money font-color-red" v-else>{{ cart.truePrice }}</view>
<view class="evaluate" v-if="evaluate == 3 && cart.isReply == 0" @click="routerGo(cart)">评价</view>
<!-- <view class="attr line1" v-if="cart.productInfo.attrInfo">{{ cart.productInfo.attrInfo.sku }}</view> -->
<view class="acea-row row-right" v-if="evaluate == 3 && cart.isReply == 0">
<view class="evaluate" @click="routerGo(cart)">评价</view>
</view>
</view>
</view>
</view>

33
components/ProductConSwiper.vue

@ -7,7 +7,7 @@
>
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item>
<image :src="item" @tap="previewImage(imgUrlsIndex)" class="slide-image" />
<image :src="item" @tap="previewImage(imgUrlsIndex)" class="slide-image" mode="aspectFill"/>
</swiper-item>
</block>
</swiper>
@ -16,7 +16,10 @@
<image :src="item" class="slide-image" />
</swiperSlide>
</swiper>-->
<view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view>
<view class="dots-box acea-row row-center">
<view :class="'dot ' + (currents == index?'on':'')" v-for="(item,index) in imgUrls.length" :key="index"></view>
</view>
<!-- <view class="pages">{{ currents || 1 }}/{{ imgUrls.length || 1 }}</view> -->
</view>
</template>
<script>
@ -37,7 +40,7 @@ export default {
data: function () {
let that = this;
return {
currents: 1,
currents: 0,
ProductConSwiper: {
autoplay: {
disableOnInteraction: false,
@ -58,7 +61,8 @@ export default {
mounted: function () {},
methods: {
handleChange(event) {
this.currents = event.mp.detail.current + 1;
this.currents = event.mp.detail.current;
// this.currents = event.mp.detail.current + 1;
},
previewImage(current) {
uni.previewImage({
@ -69,3 +73,24 @@ export default {
},
};
</script>
<style lang="less" scoped>
.dots-box {
position: absolute;
left: 50%;
transform: translateX(-50%);
padding-top: 16rpx;
.dot {
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 50%;
margin: 0rpx 8rpx;
}
.on {
width: 34rpx;
background: #2DB5AE;
border-radius: 6rpx;
transition: width .4s;
}
}
</style>

50
components/ProductWindow.vue

@ -1,13 +1,21 @@
<template>
<view>
<view class="product-window" :class="attr.cartAttr === true ? 'on' : ''">
<view class="textpic acea-row row-between-wrapper">
<view class="textpic acea-row row-between-wrapper" @touchmove.stop.prevent>
<view class="pictrue">
<image @tap="previewImage" :src="attr.productSelect.image" class="image" />
</view>
<view class="text">
<view class="line1">{{ attr.productSelect.store_name }}</view>
<view class="money font-color-red" v-if="!isIntegral">
<view class="text acea-row row-column-between">
<view class="">
<view class="line2">{{ attr.productSelect.store_name }}</view>
<view class="info line2">{{storeInfo}}</view>
</view>
<view class="money acea-row" v-if="!isIntegral">
<view class="">¥{{ attr.productSelect.price }}</view>
<text class="num">¥{{ attr.productSelect.otPrice }}</text>
</view>
<view class="money" v-if="isIntegral">{{ attr.productSelect.integral }}积分</view>
<!-- <view class="money font-color-red" v-if="!isIntegral">
<text class="num">{{ attr.productSelect.price }}</text>
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
@ -15,9 +23,9 @@
<view class="money font-color-red" v-if="isIntegral">
<text class="num">{{ attr.productSelect.integral }}积分</text>
<text class="stock">库存: {{ attr.productSelect.stock }}</text>
</view>
</view> -->
</view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
<!-- <view class="iconfont icon-guanbi" @click="closeAttr"></view> -->
</view>
<view class="productWinList">
<view
@ -27,19 +35,25 @@
>
<view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle">
<view
<view
class="itemn"
:class="item.index == indexn ? 'on' : ''"
:class="item.index == indexn? (attr.productSelect.stock!==0?'on':'isNo') : ''"
v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)"
:key="indexn"
>{{ itemn.attr }}</view
>
{{ itemn.attr }}
</view
>
</view>
</view>
</view>
<view class="cart">
<view class="title">数量</view>
<view class="cart acea-row row-between-wrapper" @touchmove.stop.prevent>
<view class="">
<view class="title">¥{{ attr.productSelect.price }}</view>
<view >库存剩余{{ attr.productSelect.stock }}{{unitName}}</view>
</view>
<view class="carnum acea-row row-left">
<view
class="item reduce"
@ -59,7 +73,7 @@
</view>
<view
class="mask"
@touchmove.prevent
@touchmove.stop.prevent
:hidden="attr.cartAttr === false"
@click="closeAttr"
></view>
@ -78,13 +92,22 @@ export default {
type: Number,
default: () => 1,
},
storeInfo: {
type: String,
default: ''
},
unitName: {
type: String,
default: ''
},
},
data: function () {
return {};
},
mounted: function () {
console.log(this.attr)
console.log(this.attr)
console.log(this);
// this.tapAttr(0,0)
},
watch: {
attr(nextAttr) {
@ -139,3 +162,4 @@ export default {
},
};
</script>

325
components/PromotionGood.vue

@ -1,53 +1,73 @@
<template>
<view>
<view class="sh-title-card mb10">
<!-- <view class="sh-title-card mb10">
<view class="title-box">
<image class="title-bg" :src="`${$VUE_APP_RESOURCES_URL}/images/title1.png`" mode="aspectFill" />
<view class="title-text">精选</view>
<!-- <view class="title-text" :style="{ color: detail.color }">为你推荐</view> -->
<view class="title-text" :style="{ color: detail.color }">为你推荐</view>
</view>
</view>
<view class="hot-goods mx20 mb10" v-if="benefit.length">
<view class="goods-list x-f">
<view class="goods-item" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex">
<view class="goods-box" @tap="routerGo(item)">
</view> -->
<!-- <view class="hot-goods mx20 mb10"> -->
<view class="goods-list acea-row row-between">
<view class="goods-item" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @tap="routerGo(item)">
<!-- <view class="goods-box"> -->
<view class="img-box">
<!-- <image class="tag-img" :src="item.image" mode=""></image> -->
<image class="img" :src="item.image" lazy-load mode="aspectFit"></image>
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image>
</view>
<view class="tip one-t">{{ item.storeName }}</view>
<view class="title more-t">{{ item.storeName }}</view>
<!-- <view class="tip one-t">{{ item.storeName }}</view> -->
<view class="name more-t">{{ item.storeName }}</view>
<view class="price-box">
<view class="flex x-bc align-end">
<view class="current"> 活动特价:{{ item.price }} <text>/市场价:{{item.otPrice}}</text> </view>
<view class="sales miso-font">仅剩{{ item.stock }}{{ item.unitName }}</view>
</view>
<view class="x-f tag-box">
<!-- <view class="discount">新人礼</view>
<view class="discount">满100减60</view> -->
</view>
<!-- <view class="flex x-bc align-end"> -->
<view class="current" v-if="!isIntegral">¥{{ item.price }}<text>¥{{item.otPrice}}</text></view>
<view class="current" v-if="isIntegral">{{ item.integral }}积分</view>
<!-- <view class="sales miso-font">仅剩{{ item.stock }}{{ item.unitName }}</view> -->
<!-- </view> -->
<!-- <view class="x-f tag-box">
<view class="discount">新人礼</view>
<view class="discount">满100减60</view>
</view> -->
</view>
</view>
<!-- </view> -->
</view>
</view>
</view>
<!-- </view> -->
</view>
</template>
<script>
export default {
name: 'PromotionGood',
props: ['benefit'],
props: {
benefit: {
type: Array,
default: () => [],
},
isIntegral: {
type: Boolean,
default: false,
}
},
data: function() {
return {}
},
methods: {
routerGo(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
if(this.isIntegral) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
}
},
},
mounted() {},
@ -55,43 +75,46 @@ export default {
</script>
<style lang="scss">
.sh-title-card {
width: 750rpx;
}
// .sh-title-card {
// width: 750rpx;
// }
.title-box {
width: 710rpx;
height: 88rpx;
margin: 0 auto;
position: relative;
border-radius: 30rpx;
// .title-box {
// width: 710rpx;
// height: 88rpx;
// margin: 0 auto;
// position: relative;
// border-radius: 30rpx;
.title-bg {
width: 100%;
height: 100%;
}
// .title-bg {
// width: 100%;
// height: 100%;
// }
.title-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: bold;
}
}
// .title-text {
// position: absolute;
// top: 50%;
// left: 50%;
// transform: translate(-50%, -50%);
// font-weight: bold;
// }
// }
.goods-box {
width: 690rpx;
background: #fff;
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
// .goods-box {
// width: 690rpx;
// background: #fff;
// padding-bottom: 20rpx;
// border-radius: 20rpx;
// overflow: hidden;
.img-box {
width: 690rpx;
height: 345rpx;
width: 332rpx;
height: 316rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
// width: 690rpx;
// height: 345rpx;
overflow: hidden;
position: relative;
// position: relative;
.tag-img {
position: absolute;
@ -103,117 +126,135 @@ export default {
}
.img {
width: 690rpx;
height: 345rpx;
width: 100%;
height: 100%;
background-color: #fff;
}
}
.tip {
width: 690rpx;
line-height: 56rpx;
background: rgba(246, 242, 234, 1);
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(168, 112, 13, 1);
padding: 0 20rpx;
}
// .tip {
// width: 690rpx;
// line-height: 56rpx;
// background: rgba(246, 242, 234, 1);
// font-size: 22rpx;
// font-family: PingFang SC;
// font-weight: 400;
// color: rgba(168, 112, 13, 1);
// padding: 0 20rpx;
// }
.title {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 36rpx;
height: 72rpx;
margin: 20rpx 20rpx 10rpx;
.name {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
margin: 10rpx 0;
text-align: center;
}
.price-box {
padding: 10rpx 20rpx 0;
width: 690rpx;
padding: 0rpx 16rpx 26rpx;
width: 100%;
box-sizing: border-box;
.sales {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(153, 153, 153, 1);
line-height: 20rpx;
margin-bottom: 20rpx;
}
text-align: center;
// .sales {
// font-size: 20rpx;
// font-family: PingFang SC;
// font-weight: 400;
// color: rgba(153, 153, 153, 1);
// line-height: 20rpx;
// margin-bottom: 20rpx;
// }
.current {
font-size: 30rpx;
font-weight: 500;
color: rgba(225, 33, 43, 1);
line-height: 30rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
// font-size: 30rpx;
// font-weight: 500;
// color: rgba(225, 33, 43, 1);
// line-height: 30rpx;
// margin-bottom: 20rpx;
&:before {
content: '¥';
font-size: 26rpx;
}
text{
color: #000000;
text-decoration: line-through;
font-size: 28rpx;
font-style: italic;
}
// &:before {
// content: '';
// font-size: 26rpx;
// }
text {
padding-left: 10rpx;
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
font-weight: 500;
// color: #000000;
text-decoration: line-through;
// font-size: 28rpx;
// font-style: italic;
}
}
.original {
font-size: 22rpx;
font-weight: 400;
text-decoration: line-through;
color: rgba(153, 153, 153, 1);
margin-left: 14rpx;
line-height: 22rpx;
margin-bottom: 10rpx;
&:before {
content: '¥';
font-size: 20rpx;
}
}
// .original {
// font-size: 22rpx;
// font-weight: 400;
// text-decoration: line-through;
// color: rgba(153, 153, 153, 1);
// margin-left: 14rpx;
// line-height: 22rpx;
// margin-bottom: 10rpx;
.tag-box {
.discount {
line-height: 28rpx;
border: 1rpx solid rgba(225, 33, 43, 1);
border-radius: 8rpx;
font-size: 18rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(225, 33, 43, 1);
padding: 0 8rpx;
margin-right: 10rpx;
}
}
// &:before {
// content: '';
// font-size: 20rpx;
// }
// }
// .tag-box {
// .discount {
// line-height: 28rpx;
// border: 1rpx solid rgba(225, 33, 43, 1);
// border-radius: 8rpx;
// font-size: 18rpx;
// font-family: PingFang SC;
// font-weight: 500;
// color: rgba(225, 33, 43, 1);
// padding: 0 8rpx;
// margin-right: 10rpx;
// }
// }
}
}
// }
//
.hot-goods {
// .hot-goods {
// background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6);
// border-radius: 20rpx;
.goods-list {
flex-wrap: wrap;
width: 710rpx;
padding: 0rpx 32rpx 8rpx;
// flex-wrap: wrap;
// width: 710rpx;
.goods-item {
margin-right: 20rpx;
width: 332rpx;
// height: 482rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
// margin-right: 20rpx;
margin-bottom: 20rpx;
width: 690rpx;
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
border-radius: 20rpx;
// width: 690rpx;
// box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
// border-radius: 20rpx;
&:nth-child(2n) {
margin-right: 0;
}
// &:nth-child(2n) {
// margin-right: 0;
// }
}
}
}
// }
</style>

18
components/Recommend.vue

@ -1,11 +1,13 @@
<template>
<view class="recommend" ref="container">
<view class="title acea-row row-center-wrapper">
<view class="title" v-if="hostProduct.length">你可能喜欢</view>
<!-- <view class="title acea-row row-center-wrapper">
<text class="iconfont icon-zhuangshixian"></text>
<text class="name">为你推荐</text>
<text class="iconfont icon-zhuangshixian lefticon"></text>
</view>
<view class="recommendList acea-row row-between-wrapper">
</view> -->
<PromotionGood :benefit="hostProduct" />
<!-- <view class="recommendList acea-row row-between-wrapper">
<view @click="routerGo(item)" class="item" v-for="(item, recommendIndex) in hostProduct"
:key="recommendIndex">
<view class="pictrue">
@ -17,22 +19,24 @@
<text class="num">{{ item.price }}</text>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view> -->
<!-- <Loading :loaded="loadend" :loading="loading"></Loading> -->
</view>
</template>
<script>
import {
getHostProducts
} from '@/api/store';
import Loading from '@/components/Loading';
import PromotionGood from '@/components/PromotionGood';
// import Loading from '@/components/Loading';
export default {
name: 'Recommend',
props: {
recommendLoading: Boolean
},
components: {
Loading
PromotionGood,
// Loading
},
watch: {
recommendLoading(nextLoading) {

110
components/Tabbar.vue

@ -0,0 +1,110 @@
<template>
<view class="tabbar-box">
<view :style="'background: '+bgcolor+';' + (addBottom?'height: 158rpx;':'height: 118rpx;')"></view>
<view class="tabbar acea-row row-around" :style="addBottom?'':'height: 118rpx;'">
<view class="item" @click="changeTab(item)" v-for="(item, index) in tabList" :key="item.pagePath">
<image class="icon" v-if="item.pagePath == pagePath" :src="item.selectedIconPath" mode="widthFix"></image>
<image class="icon" v-else :src="item.iconPath" mode="widthFix"></image>
<view class="text" :style="item.pagePath == pagePath?'color: #2DB5AE;':''">{{item.text}}</view>
<view class="line" v-if="item.pagePath == pagePath" ></view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'Tabbar',
props: {
pagePath: {
type: String,
default: 'pages/home/index'
},
bgcolor: {
type: String,
default: '#FFFFFF'
}
},
data() {
return {
addBottom: this.addBottom,
tabList: [
{
"pagePath": "/pages/home/index",
"iconPath": "../static/icon-home.png",
"selectedIconPath": "../static/icon-home-hot.png",
"text": "首页"
},
{
"pagePath": "/pages/shop/GoodsClass/index",
"iconPath": "../static/icon-class.png",
"selectedIconPath": "../static/icon-class-hot.png",
"text": "分类"
},
{
"pagePath": "/pages/shop/ShoppingCart/index",
"iconPath": "../static/icon-cart.png",
"selectedIconPath": "../static/icon-cart-hot.png",
"text": "购物车"
},
{
"pagePath": "/pages/user/User/index",
"iconPath": "../static/icon-user.png",
"selectedIconPath": "../static/icon-user-hot.png",
"text": "我的"
}
],
}
},
methods: {
changeTab(item) {
uni.switchTab({
url: item.pagePath
})
}
}
}
</script>
<style lang="less" scoped>
.tabbar-box {
width: 100%;
}
.tabbar {
position: fixed;
bottom: 0;
left: 0;
z-index: 1000;
width: 100%;
height: 158rpx;
background: #F1F1F1;
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.2);
border-radius: 28rpx 28rpx 0rpx 0rpx;
padding-top: 8rpx;
.item {
width: 66rpx;
text-align: center;
.icon {
width: 50rpx;
height: 50rpx;
image {
width: 50rpx;
height: 50rpx;
}
}
.text {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 22rpx;
color: #3A3A3C;
padding-bottom: 6rpx;
}
.line {
background-color: #2DB5AE;
height: 4rpx;
width: 66rpx;
}
}
}
</style>

44
components/UserEvaluation.vue

@ -4,24 +4,33 @@
<view class="evaluateItem" v-if="item">
<view class="pic-text acea-row row-middle">
<view class="pictrue">
<image :src="item.avatar" class="image" />
<image v-if="item.avatar" :src="item.avatar" class="image" />
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="@/static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
</view>
<view class="acea-row row-middle">
<view class="name line1">{{ item.nickname }}</view>
<view class="start" :class="'star' + item.star"></view>
<view class="">
<!-- <view class="acea-row row-middle"> -->
<view class="name line1">{{ item.nickname || '微信用户' }}</view>
<!-- <view class="start" :class="'star' + item.star"></view> -->
<view class="starBox acea-row">
<image src="@/static/images/min-star-light.png" v-for="(item, index) in stars[evaluateWtapperIndex]" :key="index"></image>
<image src="@/static/images/star-border-light.png" v-for="(item, index) in 5-stars[evaluateWtapperIndex]" :key="index"></image>
<!-- <image src="@/static/images/min-star.png" v-for="(item, index) in 5-stars[evaluateWtapperIndex]" :key="index"></image> -->
</view>
</view>
</view>
<view class="time">{{ item.createTime }} {{ item.sku||'' }}</view>
<!-- <view class="time">{{ item.createTime }} {{ item.sku||'' }}</view> -->
<view class="evaluate-infor">{{ item.comment }}</view>
<view class="imgList acea-row">
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<view class="imgList acea-row" v-if="item.picturesArr.length">
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq" v-if="eq < 3">
<image :src="itemn" class="image" />
</view>
</view>
<view class="reply" v-if="item.merchantReplyContent">
<!-- <view class="reply" v-if="item.merchantReplyContent">
<span class="font-color-red">电商店员</span>
{{item.merchantReplyContent}}
</view>
</view> -->
</view>
</view>
</view>
@ -40,13 +49,26 @@
}
},
data: function () {
return {};
return {
stars: []
};
},
mounted: function () {
console.log(this)
this.stars = this.reply.map( val => {
return val.star*1;
})
},
methods: {
dataFormat
}
};
</script>
<style lang="less" scoped>
.starBox {
padding-top: 4rpx;
image {
width: 26rpx;
height: 26rpx;
}
}
</style>

43
components/colorui/components/cu-custom.vue

@ -1,14 +1,16 @@
<template>
<view class="cu-custom" :style="[{height:CustomBar + 'px'}]">
<view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
<view class="action" @tap="BackPage" v-if="isBack">
<view class="cu-bar fixed acea-row row-between-wrapper" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'']">
<view class="action acea-row row-middle" @tap="BackPage" v-if="isBack">
<text class="cuIcon-back"></text>
<slot name="backText"></slot>
</view>
<view class="content" :style="[{top:StatusBar + 'px'}]">
<view class="content acea-row row-center-wrapper" :style="'top:'+StatusBar +'px;'+(isCenter?`box-sizing: border-box;width: 100vw;position: absolute;left: 0;text-align:center;height:calc(${CustomBar}px - ${StatusBar}px);z-index:-1;`:'')">
<slot name="content"></slot>
</view>
<slot name="right"></slot>
<!-- <view class=""> -->
<slot name="right"></slot>
<!-- </view> -->
</view>
</view>
</template>
@ -18,7 +20,12 @@
data() {
return {
StatusBar: this.StatusBar,
CustomBar: this.CustomBar
CustomBar: this.CustomBar,
CustomBarLeft: this.CustomBarLeft,
bgStyle: {
background: '#F1F1F1',
'box-shadow': '0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.5)',
}
};
},
name: 'cu-custom',
@ -26,8 +33,12 @@
style() {
var StatusBar = this.StatusBar;
var CustomBar = this.CustomBar;
var CustomBarLeft = this.CustomBarLeft;
var bgImage = this.bgImage;
var style = `height:${CustomBar}px;padding-top:${StatusBar}px;background:${this.bgColor} ;`;
var style = `padding-right:calc(100vw - ${CustomBarLeft}px);height:${CustomBar}px;padding-top:${StatusBar}px;background:${this.bgColor} ;`;
if(this.hasShadow) {
style += 'box-shadow: 0rpx 5rpx 8rpx 0rpx rgba(0,0,0,0.05);';
}
if (this.bgImage) {
style = `${style}background-image:url(${bgImage});`;
}
@ -37,21 +48,37 @@
props: {
bgColor: {
type: String,
default: ''
default: '#F1F1F1'
},
isBack: {
type: [Boolean, String],
default: false
},
isCenter: {
type: Boolean,
default: false
},
bgImage: {
type: String,
default: ''
},
hasShadow: {
type: Boolean,
default: false
}
},
methods: {
BackPage() {
uni.navigateBack({
delta: 1
delta: 1,
success(res) {
// console.log('navigateBack')
},
fail: (err) => {
uni.switchTab({
url: '/pages/home/index',
})
}
});
}
}

32
components/uni-notice-bar/uni-notice-bar.vue

@ -1,29 +1,29 @@
<template>
<view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick">
<!-- #ifdef MP-ALIPAY -->
<view v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" @click="close">
<!-- <view v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" @click="close">
<uni-icons type="closeempty" :color="color" size="12" />
</view>
<view v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon">
<uni-icons type="sound" :color="color" size="14" />
</view>
</view> -->
<!-- #endif -->
<!-- #ifndef MP-ALIPAY -->
<uni-icons v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" type="closeempty" :color="color"
<!-- <uni-icons v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" type="closeempty" :color="color"
size="12" @click="close" />
<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound" :color="color"
size="14" />
size="14" /> -->
<!-- #endif -->
<view ref="textBox" class="uni-noticebar__content-wrapper" :class="{'uni-noticebar__content-wrapper--scrollable':scrollable, 'uni-noticebar__content-wrapper--single':!scrollable && (single || moreText)}">
<view :id="elIdBox" class="uni-noticebar__content" :class="{'uni-noticebar__content--scrollable':scrollable, 'uni-noticebar__content--single':!scrollable && (single || moreText)}">
<text :id="elId" ref="animationEle" class="uni-noticebar__content-text" :class="{'uni-noticebar__content-text--scrollable':scrollable,'uni-noticebar__content-text--single':!scrollable && (single || moreText)}"
:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay}">{{text}}</text>
:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay, 'font-size':fontSize}">{{text}}</text>
</view>
</view>
<view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more" @click="clickMore">
<!-- <view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more" @click="clickMore">
<text v-if="moreText" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text>
<uni-icons type="arrowright" :color="moreColor" size="14" />
</view>
</view> -->
</view>
</template>
@ -43,6 +43,7 @@
* @property {String} backgroundColor 背景颜色
* @property {String} color 文字颜色
* @property {String} moreColor 查看更多文字的颜色
* @property {String} fontSize 文字字号
* @property {String} moreText 设置查看更多的文本
* @property {Boolean} single = [true|false] 是否单行
* @property {Boolean} scrollable = [true|false] 是否滚动为true时NoticeBar为单行
@ -85,6 +86,10 @@
type: String,
default: '#999999'
},
fontSize: {
type: String,
default: '24rpx'
},
single: {
//
type: [Boolean, String],
@ -279,8 +284,8 @@
/* #endif */
flex-direction: row;
align-items: center;
padding: 6px 12px;
margin-bottom: 10px;
padding: 0rpx 12rpx;
// margin-bottom: 10px;
}
.uni-noticebar-close {
@ -336,8 +341,13 @@
}
.uni-noticebar__content-text {
font-size: 14px;
line-height: 18px;
font-size: 24rpx;
font-family: SourceHanSansSCVF;
font-weight: 500;
color: #2DB5AE;
line-height: 32rpx;
// font-size: 14px;
// line-height: 18px;
/* #ifndef APP-NVUE */
word-break: break-all;
/* #endif */

4
components/uni-popup/uni-popup.vue

@ -267,8 +267,8 @@
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
/* #endif */
}

8
config/index.js

@ -1,5 +1,9 @@
// export const VUE_APP_API_URL = 'http://192.168.10.129:48080/bxgApp'
export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp'
export const VUE_APP_API_URL = 'http://192.168.10.113:48080/bxgApp'
// export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp'
// export const VUE_APP_API_URL = 'https://app.moo-mou.com/admin-api/bxgApp'
// export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp'
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'
export const BXG_TENANT_ID = 128
// export const BXG_TENANT_ID = 129
export const BXG_TENANT_ID = 138
// export const BXG_TENANT_ID = 128

3
libs/order.js

@ -19,6 +19,7 @@ export function cancelOrderHandle(orderId) {
uni.showModal({
title: '提示',
content: '确认取消该订单?',
confirmColor: '#2DB5AE',
success(res) {
if (res.confirm) {
cancelOrder(orderId)
@ -224,4 +225,4 @@ export function goOrderDetails(id, type) {
},
});
}
}
}

13
manifest.json

@ -1,5 +1,5 @@
{
"name" : "zsw",
"name" : "眼界甄选",
"appid" : "__UNI__74F040A",
"description" : "",
"versionName" : "1.0.1",
@ -249,16 +249,13 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wx144be2afc1798f59",
"appid" : "wx65e26ba930c02508",
"setting" : {
"urlCheck" : false
"urlCheck" : true,
"minified" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"permission" : {},
"plugins" : {}
},
// #ifdef MP-WEIXIN

209
pages.json

@ -3,7 +3,8 @@
{
"path": "pages/Loading/index",
"style": {
"navigationBarTitleText": "纽康度生物科技"
"navigationBarTitleText": "眼界甄选",
"navigationStyle": "custom"
}
},
{
@ -40,7 +41,7 @@
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "纽康度生物科技",
"navigationBarTitleText": "眼界甄选",
"navigationBarTextStyle": "white",
"navigationStyle": "custom"
}
@ -48,19 +49,22 @@
{
"path": "pages/shop/GoodSearch/index",
"style": {
"navigationBarTitleText": "搜索商品"
"navigationBarTitleText": "搜索商品",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/GoodsClass/index",
"style": {
"navigationBarTitleText": "商品分类"
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/ShoppingCart/index",
"style": {
"navigationBarTitleText": "购物车"
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
@ -72,7 +76,8 @@
{
"path": "pages/shop/GoodsList/index",
"style": {
"navigationBarTitleText": "商品列表"
"navigationBarTitleText": "商品列表",
"navigationStyle": "custom"
}
},
{
@ -84,19 +89,22 @@
{
"path": "pages/user/User/index",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/GoodsCollection/index",
"style": {
"navigationBarTitleText": "商品收藏"
"navigationBarTitleText": "我的收藏",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/GoodsFoot/index",
"style": {
"navigationBarTitleText": "我的足迹"
"navigationBarTitleText": "我的足迹",
"navigationStyle": "custom"
}
},
{
@ -114,13 +122,15 @@
{
"path": "pages/shop/EvaluateList/index",
"style": {
"navigationBarTitleText": "评价列表"
"navigationBarTitleText": "评价列表",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/GoodsEvaluate/index",
"style": {
"navigationBarTitleText": "商品评价"
"navigationBarTitleText": "商品评价",
"navigationStyle": "custom"
}
},
{
@ -132,19 +142,22 @@
{
"path": "pages/shop/HotNewGoods/index",
"style": {
"navigationBarTitleText": "热门商品"
"navigationBarTitleText": "热门榜单",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/GoodsCon/index",
"style": {
"navigationBarTitleText": "商品详情"
"navigationBarTitleText": "商品详情",
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/IntegralGoodsCon/index",
"style": {
"navigationBarTitleText": "积分商品详情"
"navigationBarTitleText": "积分商品详情",
"navigationStyle": "custom"
}
},
{
@ -156,7 +169,8 @@
{
"path": "pages/user/address/AddAddress/index",
"style": {
"navigationBarTitleText": "新增收货地址"
"navigationBarTitleText": "新增收货地址",
"navigationStyle": "custom"
}
},
{
@ -168,7 +182,8 @@
{
"path": "pages/user/address/AddressManagement/index",
"style": {
"navigationBarTitleText": "收货地址"
"navigationBarTitleText": "地址管理",
"navigationStyle": "custom"
}
},
{
@ -180,13 +195,15 @@
{
"path": "pages/user/signIn/Sign/index",
"style": {
"navigationBarTitleText": "签到"
"navigationBarTitleText": "签到",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/signIn/SignRecord/index",
"style": {
"navigationBarTitleText": "签到记录"
"navigationBarTitleText": "签到记录",
"navigationStyle": "custom"
}
},
{
@ -234,31 +251,36 @@
{
"path": "pages/user/signIn/Integral/index",
"style": {
"navigationBarTitleText": "我的积分"
"navigationBarTitleText": "我的积分",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/UserVip/index",
"style": {
"navigationBarTitleText": "用户vip"
"navigationBarTitleText": "会员中心",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/PersonalData/index",
"style": {
"navigationBarTitleText": "个人资料"
"navigationBarTitleText": "个人资料",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/coupon/UserCoupon/index",
"style": {
"navigationBarTitleText": "优惠券"
"navigationBarTitleText": "优惠券",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/coupon/GetCoupon/index",
"style": {
"navigationBarTitleText": "领取优惠券"
"navigationBarTitleText": "领券中心",
"navigationStyle": "custom"
}
},
{
@ -282,31 +304,36 @@
{
"path": "pages/order/MyOrder/index",
"style": {
"navigationBarTitleText": "我的订单"
"navigationBarTitleText": "我的订单",
"navigationStyle": "custom"
}
},
{
"path": "pages/order/Logistics/index",
"style": {
"navigationBarTitleText": "查看物流"
"navigationBarTitleText": "查看物流",
"navigationStyle": "custom"
}
},
{
"path": "pages/order/OrderDetails/index",
"style": {
"navigationBarTitleText": "订单详情"
"navigationBarTitleText": "订单详情",
"navigationStyle": "custom"
}
},
{
"path" : "pages/order/OrderReturnDetail/index",
"style": {
"navigationBarTitleText": "售后详情"
"navigationBarTitleText": "售后详情",
"navigationStyle": "custom"
}
},
{
"path": "pages/order/OrderSubmission/index",
"style": {
"navigationBarTitleText": "提交订单"
"navigationBarTitleText": "提交订单",
"navigationStyle": "custom"
}
},
{
@ -318,13 +345,15 @@
{
"path": "pages/order/GoodsReturn/index",
"style": {
"navigationBarTitleText": "商品退货"
"navigationBarTitleText": "申请售后",
"navigationStyle": "custom"
}
},
{
"path": "pages/order/ReturnList/index",
"style": {
"navigationBarTitleText": "我的售后"
"navigationBarTitleText": "售后服务",
"navigationStyle": "custom"
}
},
{
@ -375,10 +404,20 @@
"navigationBarTitleText": "推广海报"
}
},
{
"path": "pages/activity/activity/index",
"style": {
"navigationBarTitleText": "活动专区",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/activity/DargainDetails/index",
"style": {
"navigationBarTitleText": "帮砍价"
"navigationBarTitleText": "砍价详情",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
},
{
@ -402,13 +441,16 @@
{
"path": "pages/activity/GroupDetails/index",
"style": {
"navigationBarTitleText": "团购商品详情"
"navigationBarTitleText": "团购商品详情",
"navigationStyle": "custom"
}
},
{
"path": "pages/activity/GroupRule/index",
"style": {
"navigationBarTitleText": "团购规则"
"navigationBarTitleText": "拼团详情",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
},
{
@ -420,7 +462,8 @@
{
"path": "pages/activity/SeckillDetails/index",
"style": {
"navigationBarTitleText": "秒杀详情"
"navigationBarTitleText": "秒杀详情",
"navigationStyle": "custom"
}
},
{
@ -434,7 +477,93 @@
"style": {
"navigationBarTitleText": "直播列表"
}
}
},
{
"path": "pages/shop/brands/index",
"style": {
"navigationBarTitleText": "品牌馆",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/brands/brandDetail/index",
"style": {
"navigationBarTitleText": "品牌详情",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/shop/Evaluations/index",
"style": {
"navigationBarTitleText": "眼界甄选",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
// {
// "path": "pages/shop/IntegralList/index",
// "style": {
// "navigationBarTitleText": "",
// "enablePullDownRefresh": false,
// "navigationStyle": "custom"
// }
// },
{
"path": "pages/shop/Evaluations/EvaluationDetail/index",
"style": {
"navigationBarTitleText": "甄选测评",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/expert/index",
"style": {
"navigationBarTitleText": "专家专栏",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/activity/DargainGoodsDetails/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
,{
"path" : "pages/user/Problem/index",
"style" :
{
"navigationBarTitleText": "常见问题",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "pages/user/AboutUs/index",
"style" :
{
"navigationBarTitleText": "关于我们",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
,{
"path" : "pages/shop/brands/brandAll/index",
"style" :
{
"navigationBarTitleText": "全部品牌",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
],
"easycom": {
"autoscan": true,
@ -444,14 +573,14 @@
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "纽康度生物科技",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "眼界甄选",
"navigationBarBackgroundColor": "#F1F1F1",
"backgroundColor": "#F1F1F1",
"navigationStyle": "default"
},
"tabBar": {
"color": "#282828",
"selectedColor": "#eb3729",
"color": "#3A3A3C",
"selectedColor": "#2DB5AE",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"height": "50px",

6
pages/Loading/index.vue

@ -47,12 +47,12 @@ export default {
this.toLaunch()
return
}
console.log('进行登录操作')
login().finally(() => {
// console.log('')
// login().finally(() => {
this.$yrouter.switchTab({
path: '/pages/home/index',
})
})
// })
},
methods: {
...mapActions(['changeAuthorization', 'setUserInfo', 'getUser']),

652
pages/activity/DargainDetails/index.vue

@ -1,12 +1,130 @@
<template>
<view class="bargain on">
<!-- 在header上加 on 为请求支援 -->
<view class="header">
<cu-custom :isBack="true" :isCenter="true" >
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">砍价详情</view>
</block>
</cu-custom>
</view>
<view class="content-box">
<view class="banner">
<swiper @change="swiperChange">
<swiper-item>
<image :src="goodsDetail.image" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="dots acea-row">
<view class="dot on"></view>
<!-- <view :class="'dot ' + (swiperCurrent == index?'on':'')" v-for="(item, index) in goodsDetail.sliderImageArr" :key="index"></view> -->
</view>
</view>
<view class="goods-info">
<view class="price-box acea-row">
<view class="">¥{{ goodsDetail.minPrice }}</view>
<view class="productPrice">¥{{ goodsDetail.price }}</view>
</view>
<view class="goods-name">{{ goodsDetail.title }}</view>
<view class="info-text">{{ goodsDetail.info }}</view>
</view>
<image class="link-icon left" src="@/static/images/link-icon.png" mode=""></image>
<image class="link-icon right" src="@/static/images/link-icon.png" mode=""></image>
<view class="bargain-state-box">
<view class="bargain-state">
<view class="icon">
<view class="iconfont icon-kanjia"></view>
</view>
<view class="">砍价中</view>
</view>
</view>
</view>
<view class="content-box" style="padding: 46rpx 42rpx 42rpx;">
<view class="bargain-info-box acea-row row-between">
<image class="rule-tishi" src="../../../static/images/icon-tishi.png" mode="" @click="showRule"></image>
<view class="circle-info-box">
<view class="circle-info acea-row row-column row-center-wrapper">
<view class="price">¥<text>{{ bargainHelpCount.alreadyPrice || 0 }}</text></view>
<view class="text">已减</view>
</view>
</view>
<view class="right-info-box">
<view class="" v-if="bargainUserInfo && bargainUid != userInfo.uid">
<view class="">您的好友已砍{{ bargainHelpCount.alreadyPrice || 0 }}</view>
<view class="">助力ta再砍一刀</view>
</view>
<view class="" v-if="bargainUid == userInfo.uid">
<view class="">{{bargainHelpCount.price === 0?'':'加油!'}}</view>
<view v-if="bargainHelpCount.price === 0">恭喜您砍价成功!</view>
<view v-else class="">还可再砍{{bargainHelpCount.price || 0}}</view>
</view>
<view class="progress-box">
<view class="acea-row row-between">
<view class="">砍价进度</view>
<view class="">{{bargainHelpCount.pricePercent + '%'}}</view>
</view>
<view class="progress">
<view class="on" :style="{ width: bargainHelpCount.pricePercent + '%' }"></view>
</view>
</view>
</view>
</view>
<view class="btn-box">
<view class="acea-row row-center">
<!-- 参与砍价按钮 同一人-->
<view v-if="participate" class="btn bg-color-red big" @click="goParticipate">立即发起砍价</view>
<!-- 邀请好友按钮 -->
<button class="btn bg-color-red big" open-type="share" v-if="inviteFriends">邀请好友砍一刀</button>
<!-- <view class="btn bg-color-red big" v-if="inviteFriends" @click="goPoster">邀请好友砍一刀</view> -->
<!-- 支付按钮 -->
<view class="btn bg-color-red big" @click="goPay" v-if="pay">立即支付</view>
</view>
<view class="acea-row row-between">
<!-- 帮砍好友砍按钮 -->
<view v-if="helpFriendsBargain" class="btn bg-color-red" @click="getBargainHelp">帮好友砍一刀</view>
<!-- 发起砍价按钮 非同一人-->
<view v-if="bargain" class="btn" @click="getBargainStart">我也要砍价</view>
</view>
</view>
<view class="help-user-box">
<view class="acea-row row-between-wrapper">
<view class="title">助力好友记录</view>
<view class="people">{{bargainHelpList.length || 0}}人已砍价</view>
</view>
<view class="list-box acea-row">
<view class="item acea-row row-column row-middle" v-for="(item, bargainHelpListIndex) in bargainHelpList" :key="bargainHelpListIndex">
<view class="img-box">
<image v-if="item.avatar" class="avatar" :src="item.avatar" mode=""></image>
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="@/static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
</view>
<view class="name line1" v-text="item.nickname || '微信用户'"></view>
<view class="money">-¥{{ item.price }}</view>
</view>
</view>
</view>
</view>
<!-- 当前登录的用户和url上携带的用户id不一致视为被邀请砍价 -->
<view class="wrapper bargain-box on user" v-if="bargainUserInfo && bargainUid != userInfo.uid">
<!-- <view class="people">
<!-- <view class="wrapper bargain-box on user" v-if="bargainUserInfo && bargainUid != userInfo.uid">
<view class="people">
{{ bargainShare.lookCount }}人查看 {{ bargainShare.shareCount }}人分享 {{ bargainShare.userCount }}人参与
</view> -->
<!-- 帮助砍价帮砍成功-->
</view>
帮助砍价帮砍成功
<view class="pictxt acea-row row-center-wrapper">
<div class="bargain-header">
<view class="pictrue"><image :src="bargainUserInfo.avatar" /></view>
@ -16,13 +134,13 @@
</view>
</div>
</view>
</view>
<view class="wrapper bargain-box time on">
</view> -->
<!-- <view class="wrapper bargain-box time on">
<div class="pictxt">
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="goodsDetail.stopTime"></count-down>
</div>
</view>
<view class="wrapper bargain-box bargain-product">
</view> -->
<!-- <view class="wrapper bargain-box bargain-product">
<view class="pictxt acea-row row-between-wrapper" @click="openAlone">
<view class="pictrue">
<image :src="goodsDetail.image" />
@ -44,42 +162,42 @@
</view>
</view>
<!-- 砍价进度条 -->
//
<view class="cu-progress acea-row row-middle round margin-top">
<view class="acea-row row-middle bg-red" :style="{ width: bargainHelpCount.pricePercent + '%' }"></view>
</view>
<!-- 砍价进度条下的金额 -->
//
<view class="balance acea-row row-between-wrapper">
<view v-text="`已砍${bargainHelpCount.alreadyPrice || 0}元`"></view>
<view v-if="bargainHelpCount.price === 0">砍价成功</view>
<view v-else v-text="`还剩${bargainHelpCount.price || 0}元`"></view>
</view>
<!-- 砍价成功-->
<!--
surplusPrice 砍价剩余金额为0
bargainUid 砍价人为发起砍价用
userBargainStatus 砍价状态
-->
//
// surplusPrice 0
// bargainUid
// userBargainStatus
<view class="bargainSuccess" v-if="pay">
<span class="iconfont icon-xiaolian"></span>
恭喜您砍价成功快去支付吧~
</view>
<!-- 参与砍价按钮 同一人-->
//
<view v-if="participate" class="bargainBnt" @click="goParticipate">立即发起砍价</view>
<!-- 邀请好友按钮 -->
//
<view v-if="inviteFriends" class="bargainBnt" @click="goPoster">邀请好友帮砍价</view>
<!-- 帮砍好友砍按钮 -->
//
<view v-if="helpFriendsBargain" class="bargainBnt" @click="getBargainHelp">帮好友砍一刀</view>
<!-- 发起砍价按钮 非同一人-->
//
<view v-if="bargain" class="bargainBnt" @click="getBargainStart">我也要砍价</view>
<!-- 支付按钮 -->
//
<view class="bargainBnt" @click="goPay" v-if="pay">立即支付</view>
<view class="bargainBnt on" @click="goList">抢更多商品</view>
@ -89,8 +207,9 @@
位好友成功帮您砍价
</view>
<view class="lock"></view>
</view>
<view class="bargainGang bargain-box">
</view> -->
<!-- <view class="bargainGang bargain-box">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/left.png`" /></view>
<view class="titleCon">砍价帮</view>
@ -113,8 +232,8 @@
</view>
<view class="load font-color-red" v-if="!helpListStatus" @click="getBargainHelpList">点击加载更多</view>
<view class="lock"></view>
</view>
<view class="goodsDetails bargain-box">
</view> -->
<!-- <view class="goodsDetails bargain-box">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/left.png`" /></view>
<view class="titleCon">商品详情</view>
@ -122,16 +241,17 @@
</view>
<view class="conter" v-html="goodsDetail.description"></view>
<view class="lock"></view>
</view>
<view class="goodsDetails bargain-box">
</view> -->
<!-- <view class="goodsDetails bargain-box">
<view class="title font-color-red acea-row row-center-wrapper">
<view class="pictrue"><image :src="`${$VUE_APP_RESOURCES_URL}/images/left.png`" /></view>
<view class="titleCon">活动规则</view>
<view class="pictrue on"><image :src="`${$VUE_APP_RESOURCES_URL}/images/left.png`" /></view>
</view>
<view class="conter" v-html="goodsDetail.rule"></view>
</view>
<view class="bargainTip" :class="active === true ? 'on' : ''">
</view> -->
<view @touchmove.stop.prevent class="bargainTip" :class="active === true ? 'on' : ''">
<view class="cutOff" v-if="bargainUid === userInfo.uid">
您已砍掉
<text class="font-color-red" v-text="bargainHelpPrice"></text>
@ -139,12 +259,18 @@
</view>
<view class="cutOff on" v-else>
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>
您也可以砍价低价拿哦快去挑选心仪的商品吧~
您也可以砍价低价拿哦快去挑选心仪的商品吧~
</view>
<view class="tipBnt" @click="goPoster" v-if="bargainUid === userInfo.uid">邀请好友帮砍价</view>
<button class="tipBnt" open-type="share" v-if="bargainUid === userInfo.uid" @click="close">邀请好友帮砍价</button>
<!-- <view class="tipBnt" @click="goPoster" v-if="bargainUid === userInfo.uid">邀请好友帮砍价</view> -->
<view class="tipBnt" @click="getBargainStart" v-else>我也要参与</view>
</view>
<view class="mask" @touchmove.prevent :hidden="active === false" @click="close"></view>
<view class="mask" @touchmove.stop.prevent :hidden="active === false && isShowRule === false" @click="close">
<view class="bargainTip" style="padding-bottom: 0;" :class="isShowRule === true ? 'on' : ''">
<view class="rule-content" v-html="goodsDetail.rule"></view>
</view>
</view>
</view>
</template>
<script>
@ -173,11 +299,16 @@ export default {
bargainHelpList: [],
helpListStatus: false, // false true
page: 1, //
limit: 2, //
limit: 6, //
pricePercent: 0, //
bargainShare: {}, //
bargainHelpCount: {}, //
goodsDetail: {}, //
bargainHelpCount: {
pricePercent: 0
}, //
goodsDetail: {
minPrice: '',
price: '',
}, //
bargainUserInfo: [], //
bargainUid: 0, //
pay: false, //
@ -187,12 +318,21 @@ export default {
helpFriendsBargain: false, //
bargainSuccess: false, //
mainBargainSuccess: false, //
isShowRule: false, //
}
},
computed: mapGetters(['userInfo', 'isLogin']),
mounted: function () {
this.mountedStart()
},
onPullDownRefresh() {
this.getBargainShare(0);
if (this.bargainUid !== this.userInfo.uid) {
this.getBargainStartUser();
}
this.getBargainHelpList();
uni.stopPullDownRefresh();
},
methods: {
//
mountedStart: function () {
@ -203,11 +343,11 @@ export default {
if (url) {
//
that.bargainId = url.bargainId
that.bargainUid = url.partake
that.bargainUid = Number(url.partake);
} else {
//
that.bargainId = that.$yroute.query.id
that.bargainUid = that.$yroute.query.partake
that.bargainUid = Number(that.$yroute.query.partake);
}
if (this.bargainUid == 0 || !this.bargainUid) {
// urluiduid
@ -220,6 +360,7 @@ export default {
if (that.bargainUid !== that.userInfo.uid) {
that.getBargainStartUser()
}
that.getBargainHelpList();
},
//
goParticipate() {
@ -495,6 +636,11 @@ export default {
// 4. ==> && && <=0
if (this.bargainUid === this.userInfo.uid && this.bargainHelpCount.status == 1 && this.bargainHelpCount.price <= 0) {
this.pay = true
uni.showModal({
title:'砍价成功!',
showCancel: false,
confirmColor: '#2DB5AE',
})
} else {
this.pay = false
}
@ -521,7 +667,7 @@ export default {
})
.then(res => {
that.bargainUserInfo = res.data
that.getBargainHelpList()
// that.getBargainHelpList()
})
.catch(res => {
uni.showToast({
@ -533,37 +679,399 @@ export default {
},
//
close: function () {
this.active = false
this.active = false;
this.isShowRule = false;
},
showRule() {
// console.log('asdqwer')
// this.active = true;
this.isShowRule = true;
},
//
onShareAppMessage: function () {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/DargainDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid'),
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
// onShareAppMessage: function () {
// return {
// title: this.storeInfo.title,
// imageUrl: this.storeInfo.image,
// path: 'pages/activity/DargainDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid'),
// success(res) {
// uni.showToast({
// title: '',
// })
// },
// fail(res) {
// uni.showToast({
// title: '',
// icon: 'none',
// })
// },
// }
// },
},
onShareAppMessage() {
return {
path: `/pages/activity/DargainDetails/index/?id=${this.$yroute.query.id}&partake=${this.userInfo.uid}`,
title: this.goodsDetail.title,
imageUrl: this.goodsDetail.image,
path: `/pages/activity/DargainDetails/index?id=${this.bargainId}&partake=${this.bargainUid}`,
}
},
}
</script>
<style lang="less">
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
margin: 20rpx 32rpx;
width: 686rpx;
// height: 317px;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
position: relative;
.banner {
width: 100%;
height: 428rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
position: relative;
swiper {
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0rpx 0rpx;
swiper-item {
border-radius: 16rpx 16rpx 0rpx 0rpx;
image {
width: 100%;
height: 100%;
border-radius: 16rpx 16rpx 0rpx 0rpx;
}
}
}
.dots {
position: absolute;
bottom: 16rpx;
left: 50%;
transform: translateX(-50%);
.dot {
margin: 0rpx 8rpx;
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 50%;
}
.on {
width: 34rpx;
background: #2DB5AE;
border-radius: 6rpx;
}
}
}
.link-icon {
width: 32rpx;
height: 80rpx;
position: absolute;
bottom: -54rpx;
z-index: 2;
}
.left {
left: 54rpx;
}
.right {
right: 54rpx;
}
}
.content-box .goods-info {
padding: 24rpx 24rpx 42rpx;
.price-box {
font-size: 48rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 64rpx;
.productPrice {
font-size: 30rpx;
color: #999999;
line-height: 40rpx;
padding-left: 16rpx;
padding-top: 18rpx;
}
}
.goods-name {
font-size: 34rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.info-text {
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #999999;
line-height: 28rpx;
}
}
.content-box .bargain-state-box {
position: absolute;
top: 0;
right: 24rpx;
width: 126rpx;
// width: 112rpx;
height: 88rpx;
overflow: hidden;
padding: 0rpx 20rpx;
.bargain-state {
width: 100%;
// width: 72rpx;
height: 88rpx;
border-radius: 0rpx 0rpx 20rpx 20rpx;
background: #2DB5AE;
font-size: 18rpx;
font-family: PingFang SC;
font-weight: 600;
color: #F5F6F8;
line-height: 18rpx;
text-align: center;
padding-top: 2rpx;
.iconfont.icon-kanjia {
font-size: 46rpx;
color: #F5F6F8;
font-weight: 500;
line-height: 46rpx;
}
.icon {
width: 46rpx;
height: 46rpx;
margin: 10rpx auto 0rpx;
}
}
.bargain-state::before {
width: 40rpx;
height: 40rpx;
content: "";
position: absolute;
top: 0rpx;
left: -20rpx;
border-radius: 20rpx;
box-shadow: 20rpx -20rpx 0rpx #2DB5AE;
}
.bargain-state::after {
width: 40rpx;
height: 40rpx;
content: "";
position: absolute;
top: 0rpx;
right: -20rpx;
border-radius: 20rpx;
box-shadow: -20rpx -20rpx 0rpx #2DB5AE;
}
}
.content-box {
.bargain-info-box {
position: relative;
.rule-tishi {
width: 42rpx;
height: 42rpx;
position: absolute;
top: 0;
right: 0;
z-index: 2;
}
.circle-info-box {
width: 162rpx;
height: 162rpx;
box-shadow: 0rpx 0rpx 20rpx 6rpx rgba(0,0,0,0.08);
padding: 4rpx;
background: linear-gradient(135deg, rgba(27, 141, 204, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
.circle-info {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
border-radius: 50%;
.price {
font-size: 42rpx;
// font-size: 60rpx;
font-family: Futura;
font-weight: 500;
color: #F5F6F8;
line-height: 64rpx;
}
.text {
width: 124rpx;
border-top: 2rpx solid #F5F6F8;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F5F6F8;
line-height: 32rpx;
text-align: center;
}
}
}
.right-info-box {
padding-top: 6rpx;
width: 416rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 48rpx;
.progress-box {
padding-top: 10rpx;
width: 100%;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 26rpx;
.progress {
width: 100%;
height: 12rpx;
margin-top: 12rpx;
background: #D8D8D8;
border-radius: 6rpx;
overflow: hidden;
.on {
height: 100%;
background: #2DB5AE;
border-radius: 6rpx;
transition: width 0.6s ease;
}
}
}
}
}
.btn-box {
padding-top: 28rpx;
.btn {
width: 290rpx;
height: 70rpx;
background: #98DAD7;
// background: #2DB5AE;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #F5F6F8;
line-height: 70rpx;
text-align: center;
}
.big {
width: 100%;
}
}
}
.content-box .help-user-box {
padding-top: 26rpx;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 38rpx;
}
.people {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 26rpx;
}
.list-box {
padding: 0rpx 14rpx 24rpx;
width: 600rpx;
min-height: 204rpx;
margin-top: 10rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
.item {
width: 84rpx;
padding-top: 24rpx;
margin: 0rpx 14rpx;
.img-box {
width: 84rpx;
height: 84rpx;
box-shadow: 0rpx 0rpx 20rpx 6rpx rgba(0,0,0,0.08);
padding: 4rpx;
background: linear-gradient(135deg, rgba(27, 141, 204, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
.avatar {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #FFFFFF;
}
.noAvatar {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #FFFFFF;
padding-left: 6rpx;
padding-right: 5rpx;
image {
width: 100%;
}
}
}
.name {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
padding: 14rpx 0rpx 8rpx;
text-align: center;
}
.money {
font-size: 22rpx;
// font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 32rpx;
text-align: center;
}
}
}
}
.bargainTip {
.rule-content {
padding: 24rpx;
min-height: 300rpx;
max-height: 600rpx;
overflow-y: scroll;
font-size: 26rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 38rpx;
}
}
.bargain {
&.on {
.bargain-box {
@ -573,21 +1081,21 @@ export default {
border: 0;
}
.header {
height: auto;
text-align: left;
// .header {
// height: auto;
// text-align: left;
.time {
text-align: left;
font-size: 24rpx;
// .time {
// text-align: left;
// font-size: 24rpx;
margin: 0;
padding: 0;
padding: 20rpx;
width: auto;
height: auto;
}
}
// margin: 0;
// padding: 0;
// padding: 20rpx;
// width: auto;
// height: auto;
// }
// }
}
}

537
pages/activity/DargainGoodsDetails/index.vue

@ -0,0 +1,537 @@
<template>
<view class="product-con">
<view class="header">
<cu-custom :isBack="true" :isCenter="true" >
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
</cu-custom>
</view>
<!-- 商品轮播 -->
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<view class="tui-pro-detail">
<view class="activity-info-box">
<view class="tui-right__box">
<view class="acea-row row-middle row-center">
<view class="iconfont icon-kanjia"></view>
<text>砍价活动</text>
</view>
<view class="count-down-box" v-if="goodsDetail.stopTime">
<count-down :isSecond="false" :datatime="goodsDetail.stopTime" :styleAllStyle="styleAllStyle" :timeTxtStyle="timeTxtStyle"></count-down>
</view>
</view>
</view>
<view class="tui-pro-price">
<text class="tui-price">¥{{goodsDetail.minPrice}}</text>
<view class="tui-original-price">¥{{goodsDetail.price}}</view>
</view>
<view class="tui-pro-title">{{ goodsDetail.title }}</view>
<view class="tui-pro-info">{{ goodsDetail.info }}</view>
<view class="tui-sale-info">
<view class="tips acea-row">
<view class="tip">甄选品牌</view>
</view>
<view>库存{{ goodsDetail.stock }}{{ goodsDetail.unitName }}</view>
</view>
</view>
<view class="safeguard-info acea-row" v-if="tempName || goodsDetail.config">
<view class="safeguard-item" v-if="tempName">
<image class="img" src="@/static/images/by.png" mode=""></image>
<view class="line1">{{tempName}}</view>
</view>
<view class="safeguard-item" v-for="(item,index) in goodsDetail.config" :key="index">
<image class="img" :src="item.configuration" mode=""></image>
<view class="line1">{{item.content}}</view>
</view>
<!-- <view class="safeguard-item">
<image class="img" src="@/static/images/fxt.png" mode=""></image>
<view>7天无理由</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<image class="img" src="@/static/images/bj.png" mode=""></image>
<view>30天保价</view>
</view> -->
</view>
<!-- 用户评价 -->
<!-- <view class="userEvaluation" v-if="replyCount">
<view class="title acea-row row-between-wrapper" @click="goEvaluateList(storeInfo.productId)">
<view class="acea-row row-middle"><text>评价</text><text class="replyCount">{{ replyCount }}</text></view>
<view @click="goEvaluateList(id)" class="praise acea-row row-middle">
<view>好评率{{ replyChance }}%</view>
<view class="jiantou-right"></view>
</view>
</view>
<user-evaluation :reply="reply"></user-evaluation>
</view> -->
<view class="product-intro">
<!-- <view class="title">商品展示</view> -->
<view class="conter">
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="goodsDetail.description" @linktap="linktap" />
</view>
<!-- <view class="conter" v-html="goodsDetail.description"></view> -->
</view>
<view :style="addBottom?'height: 162rpx;':'height: 122rpx;'"></view>
<!--底部操作栏-->
<view class="tui-operation acea-row row-between" :style="addBottom?'height: 162rpx;':'height: 122rpx;'">
<view class="tui-operation-left acea-row row-between">
<!-- #ifdef MP-WEIXIN -->
<button class="tui-operation-item" open-type="contact" hover-class="tui-opcity" :hover-stay-time="150">
<image src="@/static/images/service-icon.png" mode=""></image>
<view class="tui-operation-text">客服</view>
</button>
<!-- #endif -->
<view @click="goShoppingCart" class="tui-operation-item">
<image src="@/static/images/cart-icon.png" mode=""></image>
<view class="tui-operation-text">购物车</view>
</view>
<!-- <view class="tui-operation-item" hover-class="tui-opcity" :hover-stay-time="150" @click="setCollect">
<image v-if="userCollect" src="@/static/images/star-light.png" mode=""></image>
<image v-else src="@/static/images/star.png" mode=""></image>
<view class="tui-operation-text">{{userCollect?'已收藏':'收藏'}}</view>
</view> -->
</view>
<view class="tui-operation-right acea-row">
<view class="btn other-col" @click="openAlone">原价购买</view>
<view v-if="goodsDetail.stock>0" class="btn" @click="goDargain">发起砍价</view>
<view v-else class="btn" style="background: #a0d2d0">已售罄</view>
</view>
</view>
<!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry">
{{entryInfo.entryInfo}}
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import ProductConSwiper from '@/components/ProductConSwiper';
import CountDown from '@/components/CountDown';
import { getBargainDetail } from '@/api/activity';
import { getEntry } from '@/api/store'
import { handleQrCode } from '@/utils/index'
export default {
components: {
ProductConSwiper,
CountDown,
},
data() {
return {
addBottom: this.addBottom,
goodsDetail: {
minPrice: 0,
price: 0,
stock: '',
unitName: '',
},
bargainId: 0,
bargainUid: 0,
imgUrls: [],
tempName: '',
styleAllStyle: 'width:30rpx;height:24rpx;background:#F5F6F8;border-radius:8rpx;font-size:20rpx;color:#3A3A3C;line-height:24rpx;',
timeTxtStyle: 'font-size:20rpx;color:#F5F6F8;line-height:24rpx;padding:0rpx 4rpx;',
entryInfo: {},
showEntry: false,
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;'
},
subType:true
};
},
onLoad() {
let url = handleQrCode()
// bargainId id
// bargainUid
if (url) {
//
this.bargainId = url.bargainId
// this.bargainUid = url.partake
} else {
//
this.bargainId = this.$yroute.query.id
// this.bargainUid = this.$yroute.query.partake
}
// if (this.bargainUid == 0 || !this.bargainUid) {
// // urluiduid
// this.bargainUid = this.userInfo.uid
// }
this.getBargainDetail();
},
methods: {
//
getBargainDetail() {
uni.showLoading({
title: '加载中',
mask: true,
})
getBargainDetail(this.bargainId).then(res => {
uni.hideLoading()
this.goodsDetail = res.data.bargain;
this.imgUrls.push(this.goodsDetail.image);
// console.log(this.goodsDetail);
this.goodsDetail.description = this.goodsDetail.description.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"');
this.goodsDetail.rule = this.goodsDetail.rule.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"');
this.tempName = res.data.tempName;
}).catch(res => {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000,
})
})
},
goShoppingCart() {
uni.setStorageSync('pathToCart', '/pages/activity/DargainGoodsDetails/index?id='+ this.bargainId +'&partake=0');
this.$yrouter.switchTab('/pages/shop/ShoppingCart/index');
},
//
openAlone() {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: this.goodsDetail.productId,
},
})
},
goDargain() {
let isParticipation=JSON.parse(this.$yroute.query.isParticipation)
if(this.subType && !isParticipation) {
let tmplIds = ['iUviwf1eQoQ2BGXdCQx7ki_EAj_4e4v1eLI5IeUbT_0'];
uni.requestSubscribeMessage({
tmplIds,
success:res=> {
this.subType=false
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
},
fail(err) {
console.log("requestSubscribeMessage err", err)
}
})
}else{
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
}
},
linktap(e) {
// console.log('description', e.innerText);
if (e.innerText == this.entryInfo.entryName) {
this.showEntry = true;
return;
}
getEntry({
name: e.innerText
}).then(res => {
this.entryInfo = res.data;
this.showEntry = true;
})
},
closeEntry() {
this.showEntry = false;
},
onShareAppMessage: function() {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/DargainGoodsDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
//
onShareTimeline(res) {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/DargainGoodsDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
}
},
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.tui-pro-detail {
margin: 8rpx 32rpx 20rpx;
width: 686rpx;
// height: 230rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 24rpx;
position: relative;
}
.activity-info-box {
position: absolute;
top: 0rpx;
right: 24rpx;
width: 220rpx;
height: 74rpx;
overflow: hidden;
.tui-right__box {
padding-top: 8rpx;
width: 188rpx;
height: 74rpx;
background: #2DB5AE;
border-radius: 0rpx 0rpx 16rpx 16rpx;
position: relative;
z-index: 1;
margin: 0rpx 16rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 26rpx;
.iconfont.icon-kanjia {
font-size: 26rpx;
font-weight: 500;
line-height: 26rpx;
margin-right: 6rpx;
}
.count-down-box {
padding-top: 6rpx;
padding-left: 10rpx;
}
}
.tui-right__box::after {
width: 32rpx;
height: 32rpx;
content: "";
position: absolute;
top: 0;
left: -32rpx;
border-radius: 16rpx;
box-shadow: 16rpx -16rpx 0rpx #2DB5AE;
}
.tui-right__box::before {
width: 32rpx;
height: 32rpx;
content: "";
position: absolute;
top: 0;
right: -32rpx;
border-radius: 16rpx;
box-shadow: -16rpx -16rpx 0rpx #2DB5AE;
}
}
.tui-pro-price {
font-size: 48rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 64rpx;
display: flex;
.tui-original-price {
padding-top: 18rpx;
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #999999;
line-height: 40rpx;
padding-left: 16rpx;
text-decoration: line-through;
}
}
.tui-pro-title {
font-size: 34rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.tui-pro-info {
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #999999;
line-height: 28rpx;
}
.tui-sale-info {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 16rpx;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 500;
color: #999999;
line-height: 28rpx;
.tips {
padding-top: 4rpx;
.tip {
width: 80rpx;
height: 26rpx;
background: #2DB5AE;
border-radius: 6rpx;
margin-right: 4rpx;
font-size: 16rpx;
font-family: PingFang SC;
color: #FFFFFF;
line-height: 26rpx;
text-align: center;
margin-right: 20rpx;
}
}
}
.safeguard-info {
width: 686rpx;
height: 120rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 18rpx 0rpx;
margin: 0rpx 32rpx 20rpx;
.safeguard-item {
flex: 1;
// width: 226rpx;
height: 84rpx;
border-right: 2rpx solid #979797;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #999999;
line-height: 28rpx;
text-align: center;
.img {
width: 46rpx;
height: 46rpx;
margin-top: 2rpx;
}
}
.safeguard-item:last-child {
border-right: 0;
}
// .line {
// width: 2rpx;
// height: 84rpx;
// background-color: #979797;
// }
}
.tui-operation {
width: 100%;
position: fixed;
z-index: 100;
bottom: 0;
left: 0;
background: #F1F1F1;
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.2);
border-radius: 28rpx 28rpx 0rpx 0rpx;
.tui-operation-left {
padding: 12rpx 28rpx;
width: 220rpx;
// width: 330rpx;
.tui-operation-item {
width: 60rpx;
display: flex;
align-items: center;
flex-direction: column;
background: none;
padding: 0;
margin: 0;
border: 0;
image {
width: 50rpx;
height: 50rpx;
}
&:after {
display: none;
}
.tui-operation-text {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 22rpx;
}
}
}
.tui-operation-right {
padding-top: 18rpx;
padding-right: 18rpx;
.btn {
width: 186rpx;
height: 66rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 66rpx;
text-align: center;
margin-right: 14rpx;
}
.other-col {
background: #98DAD7;
}
}
}
</style>

1195
pages/activity/GroupDetails/index.vue

File diff suppressed because it is too large Load Diff

1210
pages/activity/GroupRule/index.vue

File diff suppressed because it is too large Load Diff

1146
pages/activity/SeckillDetails/index.vue

File diff suppressed because it is too large Load Diff

697
pages/activity/activity/index.vue

@ -0,0 +1,697 @@
<template>
<view class="bargain on">
<view class="header">
<cu-custom :isBack="true" :isCenter="true" :bgColor="bgColor">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">活动专区</view>
</block>
</cu-custom>
</view>
<view class="banner-box">
<swiper class="swiper" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item" @click="goBannerDetail">
<image class="swiper-image " :src="item.pic" mode="aspectFill" lazy-load>
</image>
</swiper-item>
</swiper>
<view class="dots acea-row">
<view :class="'dot ' + (swiperCurrent === index ? 'dot-active' : '')" v-for="(dot, index) in banner.length" :key="index"></view>
</view>
</view>
<view class="activity-content">
<!-- <view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')"> -->
<view class="top-nav-box" :style="(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')">
<view class="activity-type-box acea-row row-center">
<view class="item" @click="setActivityType(0)">
<view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view>
</view>
<view class="item" @click="setActivityType(1)">
<view :class="'title ' + (activityType === 1 ? 'active' : '')">拼团专区</view>
</view>
<view class="item" @click="setActivityType(2)">
<view :class="'title ' + (activityType === 2 ? 'active' : '')">砍价专区</view>
</view>
</view>
<!-- <view class="tab-box acea-row row-between" v-if="activityType === 0"> -->
<view class="tab-box acea-row row-between" >
<view :class="'tab ' + (tabType === 0 ? 'active' : '')" @click="setTabType(0)">{{activityType==0?(timeList[seckillActive].status == 2 ? '活动即将开始' : '活动抢购中'):'活动中' }}</view>
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">{{activityType==0?'下期预告':'已参与'}}</view>
</view>
</view>
<view class="list-box" :style="navStyle?'padding-top:186rpx':''">
<!-- <view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''"> -->
<view class="countdown-box acea-row row-between-wrapper" v-if="activityType === 0 && tabType === 0 && timeList[seckillActive].stop">
<view class="acea-row row-middle">
<view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view>
<CountDown :isDay="true" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="timeList[seckillActive].stop"></CountDown>
</view>
<image src="../../../static/images/icon-tishi.png" mode="" @click="showRule"></image>
</view>
<view class="goods-box">
<view class="item acea-row row-between" v-for="(item,index) in goodsList" :key="index">
<image class="goods-img" :src="item.image" mode="aspectFill"></image>
<view class="info-box">
<view class="name line1">{{item.title}}</view>
<view class="progress-box" v-if="activityType === 0">
<view class="acea-row row-between">
<text>{{activityType == 0?'秒杀':activityType == 1?'拼团':'砍价'}}剩余</text>
<text>{{100 - item.percent}}%</text>
</view>
<view class="progress">
<view class="bg-red" :style="'width:'+ (100 - item.percent) + '%'"></view>
<!-- <view class="bg-red" :style="{ width: loading ? item.percent + '%' : '' }"></view> -->
</view>
</view>
<view class="original-price" v-if="activityType !== 0">
<view class="otPrice">{{activityType == 1?'单买价 ':'原价 '}}¥{{activityType == 1?item.productPrice:item.price}}</view>
</view>
<view class="acea-row row-between">
<view class="acea-row">
<view class="price">
{{activityType == 0?'秒杀价':activityType == 1?'拼团价':'可砍至'}}<text>¥{{activityType != 2?item.price:item.minPrice}}</text>
</view>
<view class="otPrice" v-if="activityType === 0">¥{{item.otPrice}}</view>
</view>
<!-- <view class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':'立即秒杀'):'发起' + (activityType == 1?'拼团':'砍价')}}</view> -->
<view :style="[{backgroundColor:tabType==1 && activityType!==0 ? '#EC3A5B':''},{backgroundColor:item.stock==0 &&tabType==0?'#a0d2d0':''}]" class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':(item.stock==0?'已售罄':'立即秒杀')):(tabType==0?(item.stock==0?'已售罄':('发起'+(activityType == 1?'拼团':'砍价'))):'参与中')}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 提示弹窗 -->
<view class="mask" @touchmove.stop.prevent :hidden="active === false && isShowRule === false" @click="close">
<view class="bargainTip" style="padding-bottom: 0;" :class="isShowRule === true ? 'on' : ''">
<view class="rule-content" v-html="timeList[0].rule"></view>
</view>
</view>
</view>
</template>
<script>
import { getBanner} from '@/api/store';
import { getSeckillConfig, getSeckillList, getCombinationList, getBargainList,getUserCombinationList} from '@/api/activity';
import CountDown from '@/components/CountDown';
import cookie from '@/utils/store/cookie'
export default {
components: {
CountDown,
},
data() {
return {
CustomBar: this.CustomBar,
bgColor: '',
banner: [],
swiperCurrent: 0,
activityType: 0,
tabType: 0,
navStyle: false,
goodsList: [],
timeList: [],
seckillList: [],
seckillTimeIndex: 0,
seckillActive: 0,
datatime: 0,
seckillForm: {
page: 1, //
limit: 10, //
},
seckillLoaded: false,
groupForm: {
page: 1, //
limit: 10, //
},
grouponList: [],
groupLoaded: false,
bargainForm: {
page: 1, //
limit: 10, //
},
bargainList: [],
participationList:[],//
bargainLoaded: false,
isShowRule: false, //
active: false,
};
},
mounted() {
this.seckillInfo();
this.getGrouponList();
this.getBargainList();
},
onLoad() {
switch (this.$yroute.query.isType){
case '0':
this.tabType=0
this.activityType=2
break;
case '1':
this.tabType=1
this.activityType=2
break;
case '2':
this.tabType=0
this.activityType=1
break;
}
getBanner(3).then(
res => {
this.$set(this,'banner',res.data.banner)
})
},
onPageScroll(e) {
if (e.scrollTop > 130) {
this.bgColor = '#F1F1F1';
this.navStyle = true;
} else {
this.bgColor = '',
this.navStyle = false;
};
},
onReachBottom() {
switch (this.activityType) {
case 0:
this.getSeckillList();
break;
case 1:
this.getGrouponList();
break;
case 2:
this.getBargainList();
break;
default:
break;
}
},
methods: {
//
close: function () {
this.active = false;
this.isShowRule = false;
},
showRule() {
// console.log('asdqwer')
// this.active = true;
this.isShowRule = true;
},
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
setActivityType(i) {
if(this.activityType == i) return;
this.activityType = i;
this.goodsList=[]
// this.tabType = 0;
if(i === 0) {
this.setTime(0);
// this.goodsList = this.seckillList;
} else if(i === 1) {
this.getGrouponList()
// this.goodsList = this.grouponList;
} else {
this.getBargainList()
// this.goodsList = this.bargainList;
}
},
setTabType(i) {
if(this.tabType == i) return;
this.goodsList=[]
this.tabType = i;
if(this.activityType == 0) {
this.setTime(i);
}else if(this.activityType == 1){
this.getGrouponList()
}else{
this.getBargainList()
}
},
goDetail(item) {
const token = cookie.get('login_status')
console.log(token,1111111111);
if(!token){
uni.showToast({
title: '请登录',
icon: "none",
duration: 2000
});
// this.$yrouter.reLaunch({
// path: '/pages/user/User/index',
// })
return
}
let id = item.id;
if(this.activityType === 0) {
let time = this.timeList[this.seckillActive].stop
this.$yrouter.push({
path: '/pages/activity/SeckillDetails/index',
query: {
id,
time,
status: this.timeList[this.seckillActive].status,
},
})
} else if (this.activityType === 1) {
this.$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id,tabType:this.tabType }
})
} else {
let isParticipation=item.isParticipation
this.$yrouter.push({
path: "/pages/activity/DargainGoodsDetails/index",
query: { id, partake: 0 ,isParticipation}
});
// this.$yrouter.push({
// path: "/pages/activity/DargainDetails/index",
// query: { id, partake: 0 }
// });
}
},
seckillInfo() {
uni.showLoading({
title: "",
});
getSeckillConfig().then(res => {
this.timeList = res.data.seckillTime;
this.timeList.forEach(res=>{
res.rule=res.rule.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
})
this.seckillTimeIndex = res.data.seckillTimeIndex;
this.seckillActive = res.data.seckillTimeIndex;
this.datatime = this.timeList[this.seckillActive].stop;
this.getSeckillList();
uni.hideLoading();
// this.$nextTick(() => {
// this.sticky = true;
// })
})
},
setTime(i) {
this.seckillList=[]
this.seckillForm.page=1
if(i == 0 && this.tabType==0) {
this.seckillActive = this.seckillTimeIndex;
} else {
if(this.seckillTimeIndex == this.timeList.length-1) {
return
} else {
this.seckillActive = this.seckillTimeIndex+1;
}
}
this.seckillForm.page = 1;
this.seckillLoaded = false;
this.datatime = this.timeList[this.seckillActive].stop;
this.seckillList = [];
uni.showLoading({
title: "",
});
this.getSeckillList();
},
getSeckillList() {
if (this.seckillLoaded) return;
uni.showLoading({
title: "",
});
let time = this.timeList[this.seckillActive].id;
getSeckillList(time, this.seckillForm).then(res => {
this.seckillLoaded = res.data.length < this.seckillForm.limit;
this.seckillList.push.apply(this.seckillList, res.data);
if(this.activityType === 0) {
this.goodsList = this.seckillList;
}
this.seckillForm.page++;
uni.hideLoading();
})
},
getGrouponList() {
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
if (this.groupLoaded) return
uni.showLoading({
title: "",
});
if(this.activityType === 1 && this.tabType===0){
getCombinationList(this.groupForm).then(res => {
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
this.groupForm.page++;
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
this.goodsList = this.grouponList;
})
}else{
getUserCombinationList(this.groupForm).then(res => {
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
this.groupForm.page++;
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
this.goodsList = this.grouponList;
})
}
uni.hideLoading();
},
getBargainList() {
if (this.bargainLoaded) return;
this.bargainList=[]
this.bargainForm.page=1
uni.showLoading({
title: "",
});
getBargainList(this.bargainForm).then(res => {
if(this.tabType===0){
this.bargainList.push.apply(this.bargainList, res.data.yxStoreBargainQueryVos);
}else{
this.bargainList.push.apply(this.bargainList, res.data.isParticipation);
}
this.bargainForm.page++;
this.bargainLoaded = res.data.length < this.bargainForm.limit;
if(this.activityType === 2) {
this.goodsList = this.bargainList;
}
uni.hideLoading();
});
},
}
}
</script>
<style lang="less" scoped>
.bargainTip {
.rule-content {
padding: 24rpx;
min-height: 300rpx;
max-height: 600rpx;
overflow-y: scroll;
font-size: 26rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 38rpx;
z-index: 100;
}
}
.header {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.banner-box {
position: relative;
width: 750rpx;
height: 488rpx;
.swiper {
width: 100%;
height: 100%;
.swiper-item {
.swiper-image {
width: 100%;
height: 100%;
}
}
}
.dots {
position: absolute;
bottom: 82rpx;
left: 50%;
transform: translateX(-50%);
z-index: 1;
.dot {
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 6rpx;
margin: 0rpx 8rpx;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
.dot-active {
width: 34rpx;
background: #3A3A3C;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
}
}
.activity-content {
position: relative;
top: -64rpx;
width: 750rpx;
.top-nav-box {
width: 750rpx;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.activity-type-box {
height: 104rpx;
padding: 34rpx 0rpx 26rpx;
.item {
width: 112rpx;
text-align: center;
position: relative;
margin: 0rpx 33rpx;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
.tab-box {
width: 100%;
bottom: 0;
height: 82rpx;
overflow: hidden;
.tab {
width: 322rpx;
height: 82rpx;
background: #D4D4D4;
border-radius: 28rpx 28rpx 0rpx 0rpx;
// float: left;
text-align: center;
position: relative;
z-index: 1;
margin: 0rpx 26rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #999999;
line-height: 82rpx;
}
.active {
background: #F1F1F1;
color: #2DB5AE;
}
.tab::after {
width: 58rpx;
height: 58rpx;
content: "";
position: absolute;
bottom: 0px;
left: -58rpx;
border-radius: 30rpx;
box-shadow: 30rpx 30rpx 0rpx #D4D4D4;
}
.tab::before {
width: 58rpx;
height: 58rpx;
content: "";
position: absolute;
bottom: 0px;
right: -58rpx;
border-radius: 30rpx;
box-shadow: -30rpx 30rpx 0rpx #D4D4D4;
}
.active::after {
box-shadow: 30rpx 30rpx 0rpx #F1F1F1;
}
.active::before {
box-shadow: -30rpx 30rpx 0rpx #F1F1F1;
}
}
}
}
.activity-content .list-box {
width: 750rpx;
height: calc(100% - 186rpx);
background: #F1F1F1;
padding: 20rpx 32rpx;
overflow-y: scroll;
.countdown-box {
width: 686rpx;
height: 66rpx;
margin-bottom: 32rpx;
border-radius: 16rpx;
border: 4rpx solid #2DB5AE;
.text {
width: 172rpx;
height: 42rpx;
border-right: 2rpx solid #2DB5AE;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
text-align: center;
margin-right: 18rpx;
}
image {
width: 42rpx;
height: 42rpx;
margin-right: 8rpx;
}
}
}
.list-box .goods-box {
padding-bottom: 20rpx;
.item {
width: 686rpx;
height: 178rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 8rpx 16rpx 8rpx 8rpx;
margin-bottom: 20rpx;
.goods-img {
width: 164rpx;
height: 164rpx;
border-radius: 16rpx;
background: #F1F1F1;
}
.info-box {
width: 478rpx;
padding-top: 8rpx;
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.progress-box {
padding: 2rpx 0rpx 16rpx;
width: 324rpx;
height: 56rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 26rpx;
.progress {
margin-top: 4rpx;
width: 324rpx;
height: 8rpx;
background: #D8D8D8;
border-radius: 4rpx;
.bg-red {
background: #2DB5AE;
border-radius: 4rpx;
height: 100%;
transition: width 0.6s ease;
}
}
}
.original-price {
height: 60rpx;
padding-top: 20rpx;
.otPrice {
text-decoration: none;
}
}
.price {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2EB5AE;
line-height: 42rpx;
text {
padding-left: 8rpx;
color: #3A3A3C;
}
}
.otPrice {
padding-top: 14rpx;
font-size: 20rpx;
font-family: Futura;
font-weight: 600;
color: #999999;
line-height: 26rpx;
text-decoration: line-through;
}
.btn {
width: 138rpx;
height: 42rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 42rpx;
text-align: center;
}
}
}
}
</style>

20
pages/authorization/index.vue

@ -4,8 +4,8 @@
<view v-if="!token" class="force-login-wrap">
<!-- <image class="logo-bg" :src="`${$VUE_APP_RESOURCES_URL}/images/logo_bg.png`" mode="aspectFill"></image> -->
<view class="force-login__content y-f">
<open-data class="user-avatar" type="userAvatarUrl"></open-data>
<open-data class="user-name" type="userNickName"></open-data>
<!-- <open-data class="user-avatar" type="userAvatarUrl"></open-data>
<open-data class="user-name" type="userNickName"></open-data> -->
<view class="login-notice">为了提供更优质的服务请先登录</view>
<button
class="cu-btn author-btn"
@ -144,10 +144,10 @@ export default {
phoneLogin(e) {
console.log('用户微信手机号登录')
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
console.log(e.mp.detail)
// console.log(e.mp.detail)
getProvider()
.then(provider => {
console.log('当前的环境商',provider)
// console.log('',provider)
if (!provider) {
reject()
}
@ -168,12 +168,13 @@ export default {
console.log('登录成功,开始处理登录信息保存,并获取用户详情')
uni.hideLoading()
store.commit('login', res.data.token, dayjs(res.data.expires_time))
store.dispatch('userInfo', true)
// store.dispatch('userInfo', true)
getUserInfo()
.then(user => {
console.log('获取用户信息成功')
uni.setStorageSync('uid', user.data.uid)
store.dispatch('setUserInfo', user.data)
this.$emit('success', this.$store.getters.token,"this.$store.getters.token")
this.$yrouter.reLaunch({
path: cookie.get('redirect').replace(/\ /g, ''),
})
@ -265,8 +266,9 @@ export default {
.author-btn {
width: 630rpx;
height: 80rpx;
background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
background: -moz-linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
background: linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
// background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
background: -moz-linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
// box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
border-radius: 40rpx;
font-size: 30rpx;
@ -280,12 +282,12 @@ export default {
height: 80rpx;
margin-top: 30rpx;
border-radius: 40rpx;
border: 2rpx solid #eb3729;
border: 2rpx solid #2DB5AE;
background: none;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #eb3729;
color: #2DB5AE;
}
}
}

166
pages/expert/index.vue

@ -0,0 +1,166 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">专家专栏</view>
</block>
</cu-custom>
</view>
<view class="list">
<view class="item" v-for="(item,index) in dataList" :key="index">
<image class="image" :src="item.image" mode="" :style="index%2?'right: 32rpx;':'left: 30rpx;'"></image>
<image v-if="index%2" class="bg" src="../../static/images/right-bg.png" mode=""></image>
<image v-else class="bg" src="../../static/images/left-bg.png" mode=""></image>
<view class="text-box" :style="index%2?'margin-left: 24rpx;':'margin-left: 296rpx;'">
<view class="acea-row">
<view class="name">{{item.expertName}}</view>
<view class="position">{{item.expertStatus}}</view>
</view>
<view class="line"></view>
<view class="unit">{{item.expertUnit}}</view>
<view class="info" :style="item.expertUnit?'':'height: 160rpx;'">{{item.expertInfo}}</view>
<view class="btn" :style="index%2?'':'margin-left: 192rpx;'" @click="contact">向ta留言咨询</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getExpert } from "@/api/public.js"
export default {
data() {
return {
dataList: [],
};
},
onLoad() {
this.getExpertList();
},
methods: {
getExpertList() {
uni.showLoading({
title: ''
})
getExpert().then(res => {
this.dataList = res.data;
uni.hideLoading();
})
},
//
contact() {
wx.openCustomerServiceChat({
extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc3952c32f3d9b68c3'},
corpId: 'ww8bcef4602d97a76a',
success(res) {}
})
},
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.list {
padding: 20rpx 32rpx;
.item {
width: 100%;
height: 330rpx;
padding-top: 26rpx;
position: relative;
margin-bottom: 32rpx;
.image {
position: absolute;
top: 0;
width: 216rpx;
height: 330rpx;
}
.bg {
position: absolute;
top: 26rpx;
width: 100%;
height: 304rpx;
z-index: -1;
// box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
}
.text-box {
padding-top: 10rpx;
width: 362rpx;
height: 304rpx;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 500;
color: #2DB5AE;
line-height: 28rpx;
.name {
font-size: 30rpx;
font-weight: bold;
color: #3A3A3C;
line-height: 46rpx;
padding-left: 4rpx;
}
.position {
padding-left: 10rpx;
font-weight: bold;
padding-top: 14rpx;
}
.line {
margin-top: 6rpx;
width: 362rpx;
height: 2rpx;
background-color: #979797;
}
.unit {
padding-left: 4rpx;
padding-bottom: 14rpx;
}
.info {
padding-left: 4rpx;
height: 132rpx;
overflow: hidden;
font-family: PingFang SC;
line-height: 26rpx;
margin-bottom: 4rpx;
}
.btn {
margin-left: 4rpx;
width: 170rpx;
height: 46rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 46rpx;
text-align: center;
}
}
}
}
</style>

59
pages/home/components/Banner.vue

@ -1,9 +1,9 @@
<template>
<view class="banner-swiper-box">
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
<!-- <canvas canvas-id="colorThief" class="hide-canvas"></canvas> -->
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item">
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="aspectFit" lazy-load>
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="aspectFill" lazy-load>
</image>
</swiper-item>
</swiper>
@ -15,7 +15,7 @@
</template>
<script>
import colorThief from 'miniapp-color-thief';
// import colorThief from 'miniapp-color-thief';
export default {
data() {
@ -27,7 +27,7 @@
props: {
detail: {
type: Array,
default: []
default: () => []
}
},
created: async function() {
@ -40,22 +40,22 @@
//
let item = this.detail[this.swiperCurrent];
//
let bgcolor = item.color;
//
if (!bgcolor) {
that.$set(item, 'bgcolor', '#0e2be6');
that.$emit('getbgcolor', '#0e2be6');
} else {
that.$set(item, 'bgcolor', bgcolor);
that.$emit('getbgcolor', bgcolor);
}
// let bgcolor = item.color;
// //
// if (!bgcolor) {
// that.$set(item, 'bgcolor', '#0e2be6');
// that.$emit('getbgcolor', '#0e2be6');
// } else {
// that.$set(item, 'bgcolor', bgcolor);
// that.$emit('getbgcolor', bgcolor);
// }
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
this.doColorThief();
let bgcolor = this.detail[this.swiperCurrent].bgcolor;
this.$emit('getbgcolor', bgcolor);
// this.doColorThief();
// let bgcolor = this.detail[this.swiperCurrent].bgcolor;
// this.$emit('getbgcolor', bgcolor);
},
//
@ -78,7 +78,7 @@
.banner-swiper-box,
.banner-carousel {
width: 750rpx;
height: 350upx;
height: 678rpx;
position: relative;
.carousel-item {
@ -99,25 +99,28 @@
.banner-swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20rpx;
left: 32rpx;
// left: 50%;
// transform: translateX(-50%);
bottom: 76rpx;
z-index: 5;
.banner-dot {
width: 14rpx;
height: 14rpx;
width: 8rpx;
height: 8rpx;
background: rgba(255, 255, 255, 1);
border-radius: 50%;
margin-right: 10rpx;
margin-right: 16rpx;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
.banner-dot-active {
width: 14rpx;
height: 14rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
width: 34rpx;
height: 8rpx;
background: #3A3A3C;
border-radius: 6rpx;
margin-right: 16rpx;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
}

568
pages/home/components/HotCommodity.vue

@ -1,219 +1,349 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:2} })">
<text class="title">热门榜单</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="jump('/pages/shop/GoodsCon/index',{id:mgoods.id})">
<view class="img-box">
<view class="tag">hot</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "HotCommodity",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
.min-goods{
margin-right: 22rpx;
}
}
</style>
<template>
<view class="group-goods">
<!-- <view class="group-goods pa20 mx20 mb10" v-if="detail.length>0"> -->
<!-- <view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:2} })">
<text class="title">热门榜单</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view> -->
<view class="classify-tab-box acea-row">
<view :class="'classify-item ' + (classifyType == index?'on':'')" v-for="(item,index) in classifyList" :key="index" @click="changeClassify(index)">
{{item.listName}}
</view>
</view>
<view class="goods-box">
<!-- <view class="goods-box swiper-box x-f"> -->
<view class="top-box">
<view class="top-item acea-row" v-for="(item,index) in topList" :key="index" @tap="jump('/pages/shop/GoodsCon/index',{id:item.id})">
<view class="top-num-box">
<view class="">{{index+1}}</view>
<view class="tip">{{index===0?'ST':index===1?'ND':index===2?'RD':'TH'}}</view>
</view>
<image class="img" :src="item.image" mode="aspectFill"></image>
<view class="info-box">
<view class="title more-t">{{item.storeName}}</view>
<view class="price-box">¥{{ item.price }}<text>¥{{item.otPrice}}</text> </view>
<view class="original">{{ item.sales }}+人购买</view>
</view>
</view>
</view>
<PromotionGood v-if="goodsList.length" :benefit="goodsList" />
<!-- <swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="jump('/pages/shop/GoodsCon/index',{id:mgoods.id})">
<view class="img-box">
<view class="tag">hot</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view> -->
</view>
</view>
</template>
<script>
// import shActivityGoods from '@/components/sh-activity-goods.vue';
import PromotionGood from '@/components/PromotionGood'
export default {
name: "HotCommodity",
components: {
PromotionGood
// shActivityGoods
},
data() {
return {
classifyList: [],
classifyType: 0,
topList: [],
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {
console.log('oArr detail', this.detail)
},
watch: {
detail(next) {
this.classifyList = next;
this.goodsList = this.sortData(next[this.classifyType].productInfo, 4);
}
},
methods: {
changeClassify(i) {
if(this.classifyType == i) return;
this.classifyType = i;
this.goodsList = this.sortData(this.classifyList[this.classifyType].productInfo, 4);
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
if(oArr.length > 5) {
this.topList = oArr.slice(0, 5);
arr = oArr.slice(5, oArr.length);
} else {
this.topList = oArr;
}
// console.log('oArr', oArr)
// oArr.forEach(c => {
// if (minArr.length === length) {
// minArr = [];
// }
// if (minArr.length === 0) {
// arr.push(minArr);
// }
// minArr.push(c);
// });
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
// position: relative;
// z-index: 9;
font-family: PingFang SC;
}
.classify-tab-box {
padding: 4rpx 32rpx 22rpx;
.classify-item {
width: 124rpx;
height: 40rpx;
border-radius: 16rpx;
border: 2rpx solid #2EB5AE;
font-size: 24rpx;
font-weight: 500;
color: #2DB5AE;
line-height: 36rpx;
text-align: center;
margin-right: 20rpx;
}
.on {
color: #FFFFFF;
background: #2DB5AE;
}
}
.top-box {
padding: 0rpx 32rpx 12rpx;
.top-item {
width: 686rpx;
height: 174rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
.top-num-box {
width: 146rpx;
height: 174rpx;
padding: 24rpx 0rpx 24rpx 12rpx;
font-size: 80rpx;
font-family: Futura;
font-weight: 700;
color: #2DB5AE;
line-height: 106rpx;
text-align: center;
.tip {
font-size: 32rpx;
line-height: 42rpx;
position: relative;
top: -22rpx;
}
}
.img {
width: 168rpx;
height: 162rpx;
border-radius: 8rpx;
margin: 6rpx 0rpx;
}
.info-box {
width: 370rpx;
height: 174rpx;
padding: 16rpx 18rpx 16rpx 10rpx;
.title {
height: 76rpx;
font-size: 26rpx;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.price-box {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
text {
font-size: 20rpx;
font-weight: 500;
color: #999999;
line-height: 26rpx;
text-decoration: line-through;
padding-left: 10rpx;
}
}
.original {
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
}
}
}
}
// .swiper-box,
// .carousel {
// width: 700rpx;
// height: 240upx;
// position: relative;
// border-radius: 20rpx;
// .carousel-item {
// width: 100%;
// height: 100%;
// // padding: 0 28upx;
// overflow: hidden;
// }
// .swiper-image {
// width: 100%;
// height: 100%;
// // border-radius: 10upx;
// background: #ccc;
// }
// }
// .swiper-dots {
// display: flex;
// position: absolute;
// left: 50%;
// transform: translateX(-50%);
// bottom: 0rpx;
// z-index: 66;
// .dot {
// width: 45rpx;
// height: 3rpx;
// background: #eee;
// border-radius: 50%;
// margin-right: 10rpx;
// }
// .dot-active {
// width: 45rpx;
// height: 3rpx;
// background: #a8700d;
// border-radius: 50%;
// margin-right: 10rpx;
// }
// }
// +
.group-goods {
// background: #fff;
// border-radius: 20rpx;
// overflow: hidden;
// .title-box {
// padding-bottom: 20rpx;
// .title {
// font-size: 32rpx;
// font-weight: bold;
// }
// .group-people {
// .time-box {
// font-size: 26rpx;
// color: #edbf62;
// .count-text-box {
// width: 30rpx;
// height: 34rpx;
// background: #edbf62;
// text-align: center;
// line-height: 34rpx;
// font-size: 24rpx;
// border-radius: 6rpx;
// color: rgba(#fff, 0.9);
// margin: 0 8rpx;
// }
// }
// .head-box {
// .head-img {
// width: 40rpx;
// height: 40rpx;
// border-radius: 50%;
// background: #ccc;
// }
// }
// .tip {
// font-size: 28rpx;
// padding-left: 30rpx;
// color: #666;
// }
// .cuIcon-right {
// font-size: 30rpx;
// line-height: 28rpx;
// color: #666;
// }
// }
// }
.goods-box {
// .goods-item {
// margin-right: 22rpx;
// &:nth-child(4n) {
// margin-right: 0;
// }
// }
}
// .min-goods {
// margin-right: 22rpx;
// }
}
</style>

428
pages/home/components/ProductsRecommended.vue

@ -1,215 +1,215 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:1} })">
<text class="title">精品推荐</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box">
<!-- <view class="tag">{{ mgoods.people}}人团</view> -->
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "ProductsRecommended",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:1} })">
<text class="title">精品推荐</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box">
<!-- <view class="tag">{{ mgoods.people}}人团</view> -->
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "ProductsRecommended",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

2141
pages/home/index.vue

File diff suppressed because it is too large Load Diff

1185
pages/home/index1.vue

File diff suppressed because it is too large Load Diff

260
pages/order/GoodsReturn/index.vue

@ -1,9 +1,22 @@
<!-- 售后提交 -->
<template>
<view class="apply-return">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">申请售后</view>
</block>
</cu-custom>
</view>
<!-- 申请售后 -->
<view class="container" v-if="selected">
<view class="goodsStyle acea-row row-between"
<!-- <view class="goodsStyle acea-row row-between"
v-for="cart in selectProduct"
:key="cart.id"
>
@ -23,42 +36,105 @@
<view class="num">x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view> -->
<view class="list">
<view v-if="serviceType === 1" class="item acea-row row-between-wrapper">
<view class="item acea-row row-between-wrapper">
<view>退款原因</view>
<picker :value="reason" :range="reasonList" @change="changeReason">
<view class="info acea-row row-between-wrapper">
<view class="num">{{reason || '请选择退款原因'}}</view>
<image src="@/static/images/right-grey.png" mode=""></image>
<!-- <text class="iconfont icon-jiantou"></text> -->
</view>
</picker>
</view>
<view class="item textarea">
<view>问题描述</view>
<view class="info acea-row">
<image src="../../../static/images/write-icon.png" mode=""></image>
<textarea class="num"
placeholder="请告诉我们问题描述吧!"
placeholder-style="font-size:24rpx;color: #999999;line-height:32rpx;font-weight:400;"
maxlength="150"
v-model="refund_reason_wap_explain"
></textarea>
<view class="text-num">{{refund_reason_wap_explain.length}}/150</view>
</view>
</view>
<view class="item">
<view>上传凭证最多3张</view>
<view class="pictrue-list acea-row row-middle" v-if="refund_reason_wap_img.length > 0">
<view class="pictrue" v-for="(item, index) in refund_reason_wap_img" :key="index" >
<image class="image" :src="item" mode="aspectFill"/>
<image class="close" src="../../../static/images/close.png" mode="" @click="refund_reason_wap_img.splice(index, 1)"></image>
</view>
<view class="pictrue uploadBnt acea-row row-center-wrapper row-column" @tap="chooseImage" v-if="refund_reason_wap_img.length < 3">
<image class="camera" src="../../../static/images/camera.png" mode=""></image>
<view>添加图片</view>
</view>
</view>
<view class="no-picture acea-row row-column row-center-wrapper" v-else @tap="chooseImage">
<image class="camera" src="../../../static/images/camera.png" mode=""></image>
<view>添加图片</view>
</view>
</view>
<view class="item">
<view>联系方式</view>
<view class="info-item acea-row row-between-wrapper" style="padding-top:20rpx;">
<view>联系人</view>
<view class="info">
<input type="text" placeholder="请输入姓名" placeholder-style="font-size:26rpx;color:#999999;line-height:62rpx;" v-model="userName">
</view>
</view>
<view class="info-item acea-row row-between-wrapper">
<view>联系电话</view>
<view class="info">
<input type="text" placeholder="请输入联系电话" placeholder-style="font-size:26rpx;color:#999999;line-height:62rpx;" v-model="phoneNumber">
</view>
</view>
</view>
<!-- <view v-if="serviceType === 1" class="item acea-row row-between-wrapper">
<view>退货件数</view>
<view class="num">{{ totalNum || 0 }}</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>退款金额</view>
<view class="num">{{ totalMoney || 0 }}</view>
</view>
<picker :value="reason" :range="reasonList" @change="changeReason">
</view> -->
<!-- <picker :value="reason" :range="reasonList" @change="changeReason">
<view class="item acea-row row-between-wrapper">
<view>退款原因</view>
<view class="num">{{reason}}</view>
<text class="iconfont icon-jiantou"></text>
</view>
</picker>
<view class="item textarea acea-row row-between">
</picker> -->
<!-- <view class="item textarea acea-row row-between">
<view>备注说明</view>
<textarea class="num"
placeholder="填写备注信息,100字以内"
v-model="refund_reason_wap_explain"
></textarea>
</view>
</view> -->
</view>
<view v-if="serviceType === 0"
<view class="returnBnt bg-color-red" @click="submit">提交</view>
<!-- <view v-if="serviceType === 0"
class="returnBnt bg-color-red"
@click="submit"
>申请退款</view>
<view v-if="serviceType === 1"
class="returnBnt bg-color-red"
@click="submit"
>申请退货</view>
>申请退货</view> -->
</view>
<!-- 选择商品 -->
<view class="selectProduct" v-else>
<!-- <view class="selectProduct" v-else>
<view class="selectContainer"
v-for="(cart, index) in selectProduct"
:key="cart.id"
@ -66,7 +142,7 @@
<view class="checkbox-wrapper">
<checkbox-group @change="switchSelect(index)">
<label class="well-check">
<checkbox color="#eb3729" value :checked="cart.checked"></checkbox>
<checkbox value :checked="cart.checked"></checkbox>
</label>
</checkbox-group>
</view>
@ -97,7 +173,6 @@
<checkbox-group @change="allChecked">
<label class="well-check">
<checkbox
color="#eb3729"
value="allSelect"
:checked="isAllSelect"
></checkbox>
@ -115,10 +190,10 @@
</view>
<view class="typeBtn">
<view class="button def" @click="chooseType(0)">仅退款</view>
<view class="button redBtn" @click="chooseType(1)">退货退款</view>
<view class="button bg-color-red" @click="chooseType(1)">退货退款</view>
</view>
</view>
</view>
</view> -->
</view>
</template>
@ -131,9 +206,7 @@ import {
import {
submitAfterSealsOrder
} from '@/api/aftersales.js';
import {
trim
} from "@/utils";
import { trim, chooseImage } from "@/utils";
import {
VUE_APP_API_URL
} from "@/config";
@ -163,7 +236,10 @@ export default {
productParamList: [],
totalNum: 0,
totalMoney: 0,
isAllSelect: false
isAllSelect: false,
// uploadPictures: [],
userName: '',
phoneNumber: '',
};
},
mounted() {
@ -206,6 +282,9 @@ export default {
});
return
}
this.userName = res.data.realName;
this.phoneNumber = res.data.userPhone;
this.chooseType(0);
uni.hideLoading()
})
.catch(err => {
@ -243,7 +322,7 @@ export default {
// 退
chooseType (val) {
this.selectProduct = this.selectProduct.map(item => {
if (item.checked) {
// if (item.checked) {
this.productParamList.push({
productId: item.productId
})
@ -251,11 +330,16 @@ export default {
this.totalMoney += parseFloat(item.truePrice)
this.totalNum += 1
return item
}
// }
}).filter(r => r)
this.selected = true;
this.serviceType = val;
},
chooseImage() {
chooseImage(img => {
this.refund_reason_wap_img.push(img);
});
},
submit() {
const refund_reason_wap_explain = trim(this.refund_reason_wap_explain);
if (!this.reason) {
@ -266,13 +350,23 @@ export default {
});
return
}
if (!this.userName || !this.phoneNumber) {
uni.showToast({
title: "请将联系方式填写完整!",
icon: 'none',
duration: 2000
});
return
}
submitAfterSealsOrder({
orderCode: this.orderInfo.orderId,
serviceType: this.serviceType,
reasonForApplication: this.reason,
applicationInstructions: refund_reason_wap_explain,
applicationDescriptionPicture: this.refund_reason_wap_img.join(","),
productParamList: this.productParamList
productParamList: this.productParamList,
applicationName: this.userName,
applicationPhone: this.phoneNumber
}).then(res => {
if (res.status === 200) {
uni.showToast({
@ -297,7 +391,125 @@ export default {
};
</script>
<style lang="scss" scoped>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.apply-return .list .item {
.info-item {
font-size: 26rpx;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
padding-bottom: 24rpx;
input {
height: 62rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 62rpx;
}
}
.info {
width: 506rpx;
height: 62rpx;
background: #F1F1F1;
border-radius: 16rpx;
padding: 0rpx 16rpx;
image {
width: 32rpx;
height: 32rpx;
}
}
}
.apply-return .list .item.textarea .info {
margin-top: 20rpx;
width: 646rpx;
height: 170rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
position: relative;
padding: 16rpx;
.num {
font-size: 24rpx;
font-weight: 600;
line-height: 32rpx;
}
.text-num {
position: absolute;
bottom: 16rpx;
right: 16rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 32rpx;
}
}
.apply-return .list .item {
.pictrue-list {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 26rpx;
padding-top: 20rpx;
.pictrue {
width: 204rpx;
height: 204rpx;
background: #F1F1F1;
border-radius: 16rpx;
margin-right: 17rpx;
margin-bottom: 20rpx;
position: relative;
.image {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
.close {
width: 30rpx;
height: 30rpx;
position: absolute;
top: 10rpx;
right: 10rpx;
}
}
.pictrue:nth-child(3n) {
margin-right: 0rpx;
}
}
.no-picture {
width: 646rpx;
height: 204rpx;
background: #F1F1F1;
border-radius: 16rpx;
margin-top: 20rpx;
}
.camera {
width: 104rpx;
height: 104rpx;
}
}
.apply-return{
.selectProduct{
margin-bottom: 180rpx;
@ -335,7 +547,7 @@ export default {
margin-top: 10rpx;
display: flex;
view{
color: #EB3729;
color: #2DB5AE;
}
}
}

506
pages/order/Logistics/index.vue

@ -1,6 +1,53 @@
<template>
<view class="logistics">
<view class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">物流详情</view>
</block>
</cu-custom>
</view>
<view class="info-box acea-row row-between">
<view class="image-box">
<image :src="cartInfo[0].productInfo.image" mode="aspectFill"></image>
<view class="image-num" v-if="cartInfo.length > 1">{{cartInfo.length}}件商品</view>
</view>
<view class="info-text">
<view class="item">配送快递{{ orderInfo.deliveryName }}</view>
<view class="item">快递单号{{ orderInfo.deliveryId }}</view>
<view class="item" @click="cellPhone">联系电话{{95338}}</view>
</view>
</view>
<view class="state-box">
<view class="state-progress acea-row row-between">
<view class="acea-row row-column row-middle" v-for="(item,index) in stateList" :key="index">
<view class="state-tip">
<view v-if="index != stateActive" class="tip">{{item.tip}}</view>
<view v-else class="active-tip acea-row row-column row-middle">
<view class="box">{{item.tip}}</view>
<view class="jiantou"></view>
</view>
</view>
<view :class="'state-item ' + (index == stateActive?'active':'')">
<view class=""></view>
</view>
</view>
<view class="state-line"></view>
</view>
<!-- <view class="acea-row row-between">
<view class="place">上海市</view>
<view class="place line1">武汉市</view>
</view> -->
</view>
<!-- <view class="header acea-row row-between row-top" v-for="cart in cartInfo" :key="cart.id">
<view class="pictrue">
<image :src="cart.productInfo.image" />
</view>
@ -11,8 +58,9 @@
<view>x{{ cart.cart_num }}</view>
</view>
</view>
</view>
<view class="logisticsCon" style="margin-bottom: 5px">
</view> -->
<!-- <view class="logisticsCon" style="margin-bottom: 5px">
<view class="company acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="iconfont icon-wuliu"></view>
@ -27,9 +75,9 @@
</view>
</view>
</view>
<!-- #ifndef H5 -->
#ifndef H5
<view class="copy acea-row row-center-wrapper copy-data" @click="copyClipboard(orderInfo.deliveryId)">复制单号</view>
<!-- #endif -->
#endif
</view>
<view class="item" v-for="(express, expressListIndex) in expressList" :key="expressListIndex">
<view class="circular" :class="expressListIndex === 0 ? 'on' : ''"></view>
@ -38,16 +86,53 @@
<view class="data">{{ express.time }}</view>
</view>
</view>
</view>
</view> -->
<view class="logistics-progress">
<view class="title">物流详情</view>
<view>
<view class="track-rcol">
<view class="track-list">
<view>
<view class="track-list-item" v-for="(item, logisticsListindex) in logisticsList" :key="logisticsListindex">
<view class="active acea-row" v-if="logisticsListindex === 0">
<view class="node-icon-box"><i class="node-icon"></i></view>
<view class="">
<view class="txt">{{ item.acceptStation }}</view>
<view class="time">{{ item.acceptTime }}</view>
</view>
</view>
<view class="acea-row" v-if="logisticsListindex > 0 && logisticsListindex !== logisticsList.length - 1">
<i class="node-icon"></i>
<view class="">
<view class="txt">{{ item.acceptStation }}</view>
<view class="time">{{ item.acceptTime }}</view>
</view>
</view>
<view v-if="logisticsList.length != 1 && logisticsListindex === logisticsList.length - 1" class="finall acea-row">
<!-- <i class="div-spilander"></i> -->
<i class="node-icon"></i>
<view class="">
<view class="txt">{{ item.acceptStation }}</view>
<view class="time">{{ item.acceptTime }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 物流进度条 -->
<view class="div-bg bg-white" style="font-size:12px; background:#fff;">
<!--物流跟踪-->
<!-- 物流进度条 物流跟踪 -->
<!-- <view class="div-bg bg-white" style="font-size:12px; background:#fff;">
<view style="margin-bottom:5px;">
<view class="bg-white" style="width: 92%; margin-left: 4%;margin: auto;padding-left: 15px;padding-right: 15px;padding-top: 10px">
<view style="font-size: 26rpx;color: #111111; margin: 5px 0">
物流跟踪
<!--物流跟踪-->
</view>
<view>
<view class="track-rcol">
@ -78,16 +163,16 @@
</view>
</view>
</view>
</view>
</view> -->
<view class="no-express" v-if="loaded && !expressList.length">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noExpress.png`" />
</view>
<Recommend></Recommend>
<!-- <Recommend></Recommend> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
// import Recommend from '@/components/Recommend'
import { express, orderDetail } from '@/api/order'
import { copyClipboard } from '@/utils'
@ -96,19 +181,38 @@ const NAME = 'Logistics'
export default {
name: NAME,
components: {
Recommend,
// Recommend,
},
data: function() {
return {
id: '',
cartInfo: [],
orderInfo: {},
stateList: [
{
state: '',
tip: '已发货'
},
{
state: '',
tip: '运输中'
},
{
state: '',
tip: '派件中'
},
{
state: '',
tip: '已签收'
},
],
stateActive: 0,
expressList: [],
loaded: false,
logisticsList: [
{
message: '暂无数据',
messageDate: '',
acceptStation: '暂无数据',
acceptTime: '',
},
],
}
@ -129,13 +233,45 @@ export default {
copyClipboard,
getExpressInfo() {
let params = {
orderCode: this.id,
shipperCode: this.orderInfo.deliverySn,
logisticCode: this.orderInfo.deliveryId,
}
express(params)
.then(res => {
this.logisticsList = res.data.Traces.reverse();
if(res.data.Traces) {
this.logisticsList = res.data.Traces;
// this.logisticsList = res.data.Traces.reverse();
if(this.logisticsList.length > 0) {
let acceptStation = this.logisticsList[0].acceptStation;
let isDelivery = false,
delivery = ['投递员','派件员','正在派件','配送员','正为您派送','正在第1次派件','派件中','派件人'];
let isignFor = false,
signFor = ['已取走', '已签收','代签收'];
isDelivery = delivery.some(val => {
return acceptStation.includes(val);
})
isignFor = signFor.some(val => {
return acceptStation.includes(val);
})
this.stateActive = 1;
if(isDelivery) {
this.stateActive = 2;
}
if (isignFor) {
this.stateActive = 3;
if(acceptStation.includes('准备分配派送员')) {
this.stateActive = 2;
}
}
} else {
this.stateActive = 0;
this.logisticsList = [{
acceptStation: '包裹正在等待揽收',
acceptTime: ''
}]
}
}
})
.catch(err => {
uni.showToast({
@ -164,7 +300,7 @@ export default {
}
this.getExpressInfo()
// const result = res.data.express.result || {};
// this.cartInfo = res.data.order.cartInfo;
this.cartInfo = res.data.cartInfo;
// this.expressList = result.list || [];
// this.loaded = true;
})
@ -176,11 +312,183 @@ export default {
})
})
},
cellPhone() {
uni.makePhoneCall({
phoneNumber: '18062552948',
fail: function () {
console.log('取消');
}
});
}
},
}
</script>
<style scoped lang="less">
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.info-box {
margin: 20rpx 32rpx;
width: 686rpx;
padding: 20rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.image-box {
width: 164rpx;
height: 164rpx;
border-radius: 16rpx;
position: relative;
image {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
.image-num {
width: 144rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 12rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 40rpx;
text-align: center;
position: absolute;
left: 10rpx;
bottom: 10rpx;
}
}
.info-text {
width: 442rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 32rpx;
.item {
padding-top: 16rpx;
}
}
}
.state-box {
margin: 0rpx 32rpx 20rpx;
width: 686rpx;
height: 208rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.state-progress {
padding: 26rpx 23rpx 16rpx;
position: relative;
.state-tip {
width: 100rpx;
height: 60rpx;
margin-bottom: 16rpx;
font-family: PingFang SC;
font-weight: 600;
text-align: center;
.tip {
padding-top: 34rpx;
font-size: 18rpx;
color: #2DB5AE;
line-height: 26rpx;
}
.box {
width: 100rpx;
height: 44rpx;
background-color: #2DB5AE;
border-radius: 16rpx;
font-size: 24rpx;
color: #FFFFFF;
line-height: 46rpx;
text-align: center;
}
.jiantou {
width: 0;
height: 0;
border-top: 16rpx solid #2DB5AE;
border-bottom: 0rpx;
border-left: 8rpx solid transparent;
border-right: 8rpx solid transparent;
}
}
.state-item {
width: 32rpx;
height: 32rpx;
padding: 4rpx;
border-radius: 50%;
position: relative;
z-index: 1;
view {
width: 24rpx;
height: 24rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
border-radius: 50%;
}
}
.active {
background: linear-gradient(rgba(27, 141, 204, 1), rgba(45, 183, 173, 1), rgba(57, 211, 150, 1));
}
.state-line {
width: 538rpx;
height: 4rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
position: absolute;
left: 74rpx;
top: 118rpx;
z-index: 0;
}
}
.place {
margin: 0rpx 6rpx;
width: 134rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 32rpx;
text-align: center;
}
}
.logistics-progress {
margin: 0rpx 32rpx 40rpx;
padding: 20rpx;
width: 686rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.title {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 42rpx;
padding-bottom: 34rpx;
}
}
.no-express {
margin: 1.5 * 100rpx 0;
}
@ -294,92 +602,136 @@ ul {
.track-list > view {
position: relative;
padding: 0 0 0.5 * 100rpx 20rpx;
padding-left: 52rpx;
padding-right: 40rpx;
// padding: 0 0 0.5 * 100rpx 20rpx;
// padding: 0 0 0.5 * 100rpx 20rpx;
}
.track-list .track-list-item {
position: relative;
padding: 0 0 0.5 * 100rpx 20rpx;
padding: 0 0 46rpx 40rpx;
// padding: 0 0 0.5 * 100rpx 20rpx;
line-height: 0.3 * 100rpx;
border-left: 1px solid #d9d9d9;
border-left: 4rpx solid #2DB7AD;
// border-left: 1px solid #d9d9d9;
color: #999;
}
.track-list .track-list-item:last-child {
border-left: 4rpx solid #F5F6F8;
}
.track-list view.first {
color: red;
padding-top: 0;
width: 100%;
text-align: left;
border-left: 1px solid #d9d9d9;
// .track-list view.first {
// color: red;
// padding-top: 0;
// width: 100%;
// text-align: left;
// border-left: 1px solid #d9d9d9;
// }
.track-list .active .node-icon-box {
position: absolute;
top: 0;
left: -17rpx;
width: 30rpx;
height: 30rpx;
padding: 4rpx;
background: radial-gradient(circle, rgba(27, 141, 204, 1), rgba(45, 183, 173, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
.node-icon {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
position: relative;
top: 0rpx;
left: 0rpx;
border-radius: 50%;
}
}
.track-list view.node-icon {
position: absolute;
left: -6.5px;
left: -14rpx;
top: 0rpx;
border-radius: 50%;
width: 0.2 * 100rpx;
height: 0.2 * 100rpx;
top: 4px;
background-color: #b2b2b2;
width: 24rpx;
height: 24rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
// width: 0.2 * 100rpx;
// height: 0.2 * 100rpx;
// background-color: #b2b2b2;
padding: 0 !important;
}
.track-list view.active .node-icon {
background-position: 0 -72px;
background-color: #ea7c0a;
width: 0.3 * 100rpx;
z-index: 2;
height: 0.3 * 100rpx;
position: absolute;
left: -0.19 * 100rpx;
top: 0;
border-radius: 50%;
}
// .track-list view.active .node-icon {
// background-position: 0 -72px;
// background-color: #ea7c0a;
// width: 0.3 * 100rpx;
// z-index: 2;
// height: 0.3 * 100rpx;
// position: absolute;
// left: -0.19 * 100rpx;
// top: 0;
// border-radius: 50%;
// }
.track-list view.time {
margin-right: 20px;
position: relative;
top: 4px;
display: inline-block;
vertical-align: middle;
color: #999;
width: 100%;
text-align: left;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 24rpx;
padding-top: 10rpx;
// margin-right: 20px;
// position: relative;
// top: 4px;
// display: inline-block;
// vertical-align: middle;
// color: #999;
// width: 100%;
// text-align: left;
}
.track-list view.txt {
position: relative;
display: inline-block;
vertical-align: top;
color: #999;
left: 0.2 * 100rpx;
top: 0.04 * 100rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
// display: inline-block;
// vertical-align: top;
// color: #999;
// left: 0.2 * 100rpx;
// top: 0.04 * 100rpx;
}
.track-list view.first .time {
text-align: left;
width: 94%;
color: red;
}
// .track-list view.first .time {
// text-align: left;
// width: 94%;
// color: red;
// }
.track-list view.first .txt {
color: red;
text-align: left;
width: 94%;
}
// .track-list view.first .txt {
// color: red;
// text-align: left;
// width: 94%;
// }
.track-list view.finall {
padding: 0px 0 0.5 * 100rpx 5px;
line-height: 18px;
border-color: white;
border-left: 1px solid #ffffff;
color: #999;
}
// .track-list view.finall {
// padding: 0px 0 0.5 * 100rpx 5px;
// line-height: 18px;
// border-color: white;
// border-left: 1px solid #ffffff;
// color: #999;
// }
.track-list view.finall .div-spilander {
width: 1px;
width: 4rpx;
position: absolute;
left: -1.5px;
left: -2rpx;
height: 0.5 * 100rpx;
background-color: #d9d9d9;
background-color: #2DB7AD;
}
</style>

403
pages/order/MyOrder/index.vue

@ -1,14 +1,175 @@
<template>
<view class="my-order" ref="container">
<view class="header bg-color-red">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的订单</view>
</block>
</cu-custom>
</view>
<view class="nav-box" :style="'top:calc('+CustomBar+'px+2px)'">
<view class="nav acea-row row-around">
<view class="item" @click="changeType(-1)">
<view :class="'title ' + (type == -1? 'active' : '')">全部</view>
</view>
<view class="item" @click="changeType(0)">
<view :class="'title ' + (type == 0? 'active' : '')">待付款</view>
</view>
<view class="item" @click="changeType(1)">
<view :class="'title ' + (type === 1 ? 'active' : '')">待发货</view>
</view>
<view class="item" @click="changeType(2)">
<view :class="'title acea-row row-middle ' + (type === 2 ? 'active' : '')">待收货</view>
</view>
<view class="item" @click="changeType(3)">
<view :class="'title acea-row row-middle ' + (type === 3 ? 'active' : '')">待评价</view>
</view>
<!-- <view class="item" @click="changeType(4)">
<view :class="'title acea-row row-middle ' + (type === 4 ? 'active' : '')">已完成</view>
</view> -->
</view>
</view>
<view class="list-box" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="list" v-if="orderList.length > 0">
<view class="item" v-for="(order, orderListIndex) in orderList" :key="orderListIndex">
<view class="title acea-row row-between-wrapper">
<view class="orderId">订单编码{{order.orderId}}</view>
<!-- <view class="acea-row row-middle">
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.combinationId > 0">拼团</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span>
{{ order.createTime }}
</view> -->
<view class="" v-if="order.status == 8">已取消</view>
<view class="font-color-red" v-else>{{ getStatus(order) || order._status._title }}</view>
</view>
<view @click="goOrderDetails(order)" style="padding-bottom: 6rpx;">
<view class="item-info acea-row" v-for="(cart, cartInfoIndex) in order.cartInfo" :key="cartInfoIndex">
<view class="pictrue">
<image :src="cart.productInfo.image" @click.stop="$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: cart.productInfo.id } })" v-if="cart.combinationId === 0 && cart.bargainId === 0 && cart.seckillId === 0" />
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id: cart.combinationId },
})
"
v-else-if="cart.combinationId > 0"
/>
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/DargainDetails/index',
query: { id: cart.bargainId },
})
"
v-else-if="cart.bargainId > 0"
/>
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/SeckillDetails/index',
query: { id: cart.seckillId },
})
"
v-else-if="cart.seckillId > 0"
/>
</view>
<view class="text">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="acea-row">
<view class="attrSku">{{cart.productInfo.attrInfo.sku}}</view>
</view>
<view class="money acea-row row-between">
<view v-if="order.payType != 'integral'"> {{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} </view>
<view v-if="order.payType == 'integral'"> {{ order.payIntegral }}积分 </view>
<view class="num">x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view>
<view class="acea-row row-between-wrapper">
<view class="totalPrice">
{{order._status._type == 0 ? '应' : '已'}}付金额
<text class="money" v-if="order.payType != 'integral'">{{ order.payPrice }}</text>
<text class="money" v-if="order.payType == 'integral'">{{ order.payIntegral }}积分</text>
</view>
<view class="bottom acea-row row-right row-middle">
<template v-if="order._status._type == 0 && order.status != 8">
<view class="bnt" @click="cancelOrder(order)">取消订单</view>
<view class="bnt bg-color-red" @click="goOrderDetails(order)">立即付款</view>
</template>
<template v-if="order._status._type == 1 || order._status._type == 9 || order.status == 8">
<view class="bnt" @click="goOrderDetails(order)">查看详情</view>
</template>
<template v-if="order._status._type == 2">
<view class="bnt" @click="goLogistics(order)">查看物流</view>
<view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
</template>
<template v-if="order._status._type == 3">
<!-- ////////////////////////
<view
class="bnt default"
@click="
$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})
"
v-if="order.deliveryType == 'express'"
&gt;
查看物流
</view>
/////////////////////// -->
<view class="bnt" @click="goOrderDetails(order)">评价商品</view>
</template>
<!-- ///////////
<template v-if="order._status._type === 4">
<view class="bnt" @click="goOrderDetails(order)">查看订单</view>
</template>
///////// -->
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
<!-- <view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noOrder.png`" />
</view>
</view> -->
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image src="@/static/images/no-more.png" />
</view>
<view class="text-big">
什么都没有大概被外星人带走了
</view>
<view class="text-small">
快去下单吧
</view>
</view>
</view>
<!-- <view class="header bg-color-red">
<view class="picTxt acea-row row-between-wrapper">
<view class="text">
<view class="name">订单信息</view>
<view>累计订单{{ orderData.orderCount || 0 }} 总消费{{ orderData.sumPrice || 0 }}</view>
</view>
</view>
</view>
<view class="nav acea-row row-around">
</view> -->
<!-- <view class="nav acea-row row-around">
<view class="item" :class="{ on: type === 0 }" @click="changeType(0)">
<view>待付款</view>
<view class="num">{{ orderData.unpaidCount || 0 }}</view>
@ -29,105 +190,8 @@
<view>已完成</view>
<view class="num">{{ orderData.completeCount || 0 }}</view>
</view>
</view>
<view class="list">
<view class="item" v-for="(order, orderListIndex) in orderList" :key="orderListIndex">
<view class="title acea-row row-between-wrapper">
<view class="acea-row row-middle">
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.combinationId > 0">拼团</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span>
{{ order.createTime }}
</view>
<view class="font-color-red">{{ getStatus(order) }}</view>
</view>
<view @click="goOrderDetails(order)">
<view class="item-info acea-row row-between row-top" v-for="(cart, cartInfoIndex) in order.cartInfo" :key="cartInfoIndex">
<view class="pictrue">
<image :src="cart.productInfo.image" @click.stop="$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: cart.productInfo.id } })" v-if="cart.combinationId === 0 && cart.bargainId === 0 && cart.seckillId === 0" />
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id: cart.combinationId },
})
"
v-else-if="cart.combinationId > 0"
/>
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/DargainDetails/index',
query: { id: cart.bargainId },
})
"
v-else-if="cart.bargainId > 0"
/>
<image
:src="cart.productInfo.image"
@click.stop="
$yrouter.push({
path: '/pages/activity/SeckillDetails/index',
query: { id: cart.seckillId },
})
"
v-else-if="cart.seckillId > 0"
/>
</view>
<view class="text acea-row row-between">
<view class="name line2">{{ cart.productInfo.storeName }}</view>
<view class="money">
<view v-if="order.payType != 'integral'"> {{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} </view>
<view v-if="order.payType == 'integral'"> {{ order.payIntegral }}积分 </view>
<view>x{{ cart.cartNum }}</view>
</view>
</view>
</view>
</view>
<view class="totalPrice">
{{ order.cartInfo.length || 0 }}件商品总金额
<text class="money font-color-red" v-if="order.payType != 'integral'">{{ order.payPrice }}</text>
<text class="money font-color-red" v-if="order.payType == 'integral'">{{ order.payIntegral }}积分</text>
</view>
<view class="bottom acea-row row-right row-middle">
<template v-if="order._status._type == 0">
<view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
<view class="bnt bg-color-red" @click="goOrderDetails(order)">立即付款</view>
</template>
<template v-if="order._status._type == 1 || order._status._type == 9">
<view class="bnt bg-color-red" @click="goOrderDetails(order)">查看详情</view>
</template>
<template v-if="order._status._type == 2">
<view class="bnt default" @click="goLogistics(order)">查看物流</view>
<view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
</template>
<template v-if="order._status._type == 3">
<!--<view-->
<!--class="bnt default"-->
<!--@click="-->
<!--$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})-->
<!--"-->
<!--v-if="order.deliveryType == 'express'"-->
<!--&gt;-->
<!--查看物流-->
<!--</view>-->
<view class="bnt bg-color-red" @click="goOrderDetails(order)">去评价</view>
</template>
<template v-if="order._status._type === 4">
<view class="bnt bg-color-red" @click="goOrderDetails(order)">查看订单</view>
</template>
</view>
</view>
</view>
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noOrder.png`" />
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view> -->
<!-- <Loading :loaded="loaded" :loading="loading"></Loading> -->
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
</view>
</template>
@ -148,11 +212,12 @@ export default {
name: NAME,
data() {
return {
CustomBar: this.CustomBar,
offlinePayStatus: 2,
orderData: {},
type: '',
page: 1,
limit: 20,
limit: 10,
loaded: false,
loading: false,
orderList: [],
@ -167,9 +232,10 @@ export default {
DataFormat,
},
computed: mapGetters(['userInfo']),
onLoad() {
this.type = parseInt(this.$yroute.query.type) || 0;
},
onShow: function() {
console.log(this)
this.type = parseInt(this.$yroute.query.type) || 0
this.changeType(this.type)
this.getOrderData()
this.getOrderList()
@ -284,20 +350,135 @@ export default {
</script>
<style scoped lang="less">
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.nav-box {
padding-top: 4rpx;
background: #F1F1F1;
position: fixed;
left: 0;
z-index: 5;
}
.nav {
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
.list-box {
padding-top: 112rpx;
background: #FFFFFF;
}
.my-order .list {
.item {
.title {
.orderId {
font-size: 20rpx;
line-height: 26rpx;
}
}
.item-info .text{
.attrSku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
color: #999999;
line-height: 46rpx;
}
.money .num {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 32rpx;
}
}
}
}
.noCart {
margin-top: 0.17 * 100rpx;
padding-top: 0.1 * 100rpx;
// margin-top: 0.17 * 100rpx;
// padding-top: 0.1 * 100rpx;
}
.noCart .pictrue {
width: 4 * 100rpx;
height: 3 * 100rpx;
// width: 4 * 100rpx;
// height: 3 * 100rpx;
width: 428rpx;
height: 526rpx;
overflow: hidden;
margin: 0.7 * 100rpx auto 0.5 * 100rpx auto;
}
.text-big{
padding: 0 30rpx;
text-align: center;
font-family: PingFangSC-Medium, PingFang SC;
font-style: 36rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.text-small{
padding: 0 80rpx;
font-family: PingFangSC-Medium, PingFang SC;
text-align: center;
font-style: 28rpx;
font-weight: 400;
color: #3A3A3C;
line-height: 40rpx;
}
.noCart .pictrue image {
width: 4 * 100rpx;
height: 3 * 100rpx;
// width: 4 * 100rpx;
// height: 3 * 100rpx;
width: 428rpx;
height: 526rpx;
}
</style>

283
pages/order/OrderDetails/index.vue

@ -1,14 +1,58 @@
<template>
<view class="order-details">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">订单详情</view>
</block>
</cu-custom>
</view>
<!-- 给header上与data上加on为退款订单-->
<view class="header bg-color-red acea-row row-middle" :class="refundOrder ? 'on' : ''">
<view class="data" :class="refundOrder ? 'on' : ''">
<view class="state">{{ orderInfo._status._msg }}</view>
<view>{{ orderInfo.createTime || '' }}</view>
<view class="top-box bg-color-red acea-row row-between-wrapper" :class="refundOrder ? 'on' : ''">
<view class="acea-row row-middle" v-if="orderInfo.status == 8">
<image class="icon" src="../../../static/images/order-close.png" mode=""></image>
<view class="status">订单已取消</view>
</view>
<view class="acea-row row-middle" v-else-if="status.type === 0 || status.type === 9">
<image class="icon" src="../../../static/images/order-status1.png" mode=""></image>
<view class="status">等待付款</view>
</view>
<view class="acea-row row-middle" v-else-if="status.type === 1">
<image class="icon" src="../../../static/images/order-status2.png" mode=""></image>
<view class="status">等待发货</view>
</view>
<view class="acea-row row-middle" v-else-if="status.type === 2">
<image class="icon" src="../../../static/images/order-status3.png" mode=""></image>
<view class="status">运途待签收</view>
</view>
<view class="acea-row row-middle" v-else-if="status.type === 3 || status.type === 4">
<image class="icon" src="../../../static/images/order-status4.png" mode=""></image>
<view class="status">交易完成</view>
</view>
<view class="acea-row row-middle" v-else-if="status.type === 6 || status.type === -1">
<image class="icon" src="../../../static/images/order-status1.png" mode=""></image>
<view class="status">{{ orderInfo._status._title }}</view>
</view>
<view class="data" :class="refundOrder ? 'on' : ''" v-if="orderInfo.status !== 8">
<view class="" v-if="status.type === 0 || status.type === 9">{{ orderInfo._status._msg }}</view>
<view class="" v-else-if="status.type === 1">{{ orderInfo._status._msg }}</view>
<view class="" v-else-if="status.type === 2">{{ orderInfo.deliveryName }}</view>
<view class="" v-else-if="status.type === 3 || status.type === 4">您已签收</view>
<view class="" v-else>{{ orderInfo._status._msg }}</view>
<view class="tip" v-if="status.type === 0">未付款订单超时将关闭</view>
<!-- <view class="state">{{ orderInfo._status._msg }}</view>
<view>{{ orderInfo.createTime || '' }}</view> -->
</view>
</view>
<template v-if="!refundOrder">
<view class="nav">
<!-- <view class="nav">
<view class="navCon acea-row row-between-wrapper">
<view :class="{ on: status.type === 0 || status.type === 9 }">待付款</view>
<view :class="{ on: status.type === 1 }" v-if="orderInfo.shippingType === 2">待核销</view>
@ -60,7 +104,9 @@
: ''
]"></view>
</view>
</view>
</view> -->
<!-- 自提核销
<div class="writeOff" v-if="orderInfo.shippingType === 2 && orderInfo.paid === 1">
<div class="title">核销信息</div>
<div class="grayBg">
@ -95,19 +141,19 @@
<div class="place cart-color acea-row row-center-wrapper" @click="showChang(orderInfo.systemStore)">
<span class="iconfont icon-weizhi"></span>查看位置
</div>
</div>
<view class="address" v-if="orderInfo.shippingType === 1">
</div> -->
<!-- <view class="address" v-if="orderInfo.shippingType === 1"> -->
<view class="address">
<view class="name">
{{ orderInfo.realName }}
<text class="phone">{{ orderInfo.userPhone }}</text>
<text
@click="telPhone(orderInfo.userPhone)"
class="iconfont icon-tonghua font-color-red"
></text>
<!-- <text @click="telPhone(orderInfo.userPhone)" class="iconfont icon-tonghua font-color-red"></text> -->
</view>
<view>{{ orderInfo.userAddress }}</view>
<view class="area">{{ addressInfo.area }}</view>
<view>{{ addressInfo.info }}</view>
</view>
<div class="address" v-else>
<!-- <div class="address" v-else>
<div class="name">
{{ system_store.name}}
<span class="phone">{{ system_store.phone }}</span>
@ -116,49 +162,85 @@
:href="'tel:' + system_store.phone"></span>
</div>
<div>{{ system_store.address }}</div>
</div>
<view class="line" v-if="orderInfo.shippingType === 1">
</div> -->
<!-- <view class="line" v-if="orderInfo.shippingType === 1">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" />
</view>
</view> -->
</template>
<OrderGoods
:evaluate="status.type || 0"
:isIntegral="isIntegral"
:cartInfo="orderInfo.cartInfo || []"
></OrderGoods>
<view class="wrapper">
<view class="title">订单信息</view>
<view class="item acea-row row-between" v-if="!isIntegral">
<view>商品合计</view>
<view class="conter">{{ orderInfo.totalPrice || 0 }}</view>
</view>
<view class="item acea-row row-between" v-if="isIntegral">
<view>支付积分</view>
<view class="conter">{{ orderInfo.payIntegral || 0 }}积分</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.payPostage > 0">
<view>运费</view>
<view class="conter">{{ orderInfo.payPostage || 0 }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.couponPrice > 0">
<view>优惠券</view>
<view class="conter">{{ orderInfo.couponPrice || 0 }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.useIntegral > 0">
<view>积分抵扣</view>
<view class="conter">-{{ orderInfo.deductionPrice || 0 }}</view>
</view>
<view class="item acea-row row-between">
<view>应付款</view>
<view class="actualPay" v-if="!isIntegral">{{ orderInfo.payPrice || 0 }}</view>
<view class="actualPay" v-if="isIntegral">{{ orderInfo.payIntegral || 0 }}积分</view>
</view>
<!-- <view class="actualPay acea-row row-right">
实付款
<text class="money font-color-red" v-if="!isIntegral">{{ orderInfo.payPrice || 0 }}</text>
<text class="money font-color-red" v-if="isIntegral">{{ orderInfo.payIntegral || 0 }}积分</text>
</view> -->
<view class="line"></view>
<view class="item acea-row row-between">
<view>订单编号</view>
<view>订单编号</view>
<view class="conter acea-row row-middle row-right">
{{ orderInfo.orderId || '' }}
<!-- #ifndef H5 -->
<text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text>
<!-- #endif -->
<text class="copy copy-data" @click="copyClipboard(orderInfo.orderId)">复制</text>
<!-- #endif -->
</view>
</view>
<view class="item acea-row row-between">
<view>下单时间</view>
<view>提交时间</view>
<view class="conter">{{ orderInfo.createTime || '' }}</view>
</view>
<view class="item acea-row row-between">
<!-- <view class="item acea-row row-between">
<view>订单类型</view>
<view class="conter">{{ orderTypeName || '' }}</view>
</view>
<view class="item acea-row row-between">
<view>支付状态</view>
<view class="conter">{{ orderInfo.paid ? "已支付" : "未支付" }}</view>
</view>
</view> -->
<view class="item acea-row row-between">
<view>支付方式</view>
<view>支付方式</view>
<view class="conter">{{ orderInfo._status._payType || '' }}</view>
</view>
<view class="item acea-row row-between" v-if="orderInfo.mark">
<!-- <view class="item acea-row row-between" v-if="orderInfo.mark">
<view>买家留言</view>
<view class="conter">{{ orderInfo.mark || '' }}</view>
</view>
</view> -->
</view>
<view v-if="orderInfo.status != 0">
<!-- <view v-if="orderInfo.status != 0">
<view class="wrapper" v-if="orderInfo.deliveryType === 'express'">
<view class="item acea-row row-between">
<view>配送方式</view>
@ -191,7 +273,8 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- 退款订单详情 -->
<view class="wrapper" v-if="refundOrder">
<view class="item acea-row row-between">
@ -207,7 +290,8 @@
<view class="conter">{{ orderInfo.userAddress || '' }}</view>
</view>
</view>
<view class="wrapper">
<!-- <view class="wrapper">
<view class="item acea-row row-between" v-if="!isIntegral">
<view>支付金额</view>
<view class="conter">{{ orderInfo.totalPrice || 0 }}</view>
@ -233,19 +317,20 @@
<text class="money font-color-red" v-if="!isIntegral">{{ orderInfo.payPrice || 0 }}</text>
<text class="money font-color-red" v-if="isIntegral">{{ orderInfo.payIntegral || 0 }}积分</text>
</view>
</view>
<view style="height:100rpx;" v-if="!refundOrder && offlineStatus"></view>
<view class="footer acea-row row-right row-middle" v-if="!refundOrder && offlineStatus">
</view> -->
<view :style="addBottom?'height: 162rpx;':'height: 122rpx'" v-if="!refundOrder && offlineStatus && orderInfo.status !== 8 && status.type != -1"></view>
<view class="footer acea-row row-right" v-if="!refundOrder && offlineStatus && orderInfo.status !== 8 && status.type != -1" :style="addBottom?'':'height: 122rpx'">
<template v-if="status.type == 0">
<view class="bnt cancel" @click="cancelOrder">取消订单</view>
<view class="bnt bg-color-red" @click="pay = true">立即付款</view>
</template>
<template v-if="orderInfo.refundStatus === 0 && orderInfo.paid === 1">
<view class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请售后</view>
<template v-if="orderInfo.refundStatus === 0 && orderInfo.paid === 1 && status.type != 4">
<view class="bnt default" @click="goGoodsReturn(orderInfo)">申请售后</view>
</template>
<!-- -->
<template v-if="orderInfo.shippingType == 1 && status.type == 2">
<view class="bnt default"
<view class="bnt bg-color-red"
@click="$yrouter.push({
path: '/pages/order/Logistics/index',
query:{
@ -256,12 +341,12 @@
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
</template>
<template v-if="orderInfo.shippingType == 1 && status.type == 3 && orderInfo.deliveryType == 'express'">
<view class="bnt default"
<view class="bnt bg-color-red"
@click="$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})">查看物流</view>
</template>
<template v-if="orderInfo.shippingType == 1 && status.type == 4">
<view class="bnt cancel" @click="delOrder">删除订单</view>
<view class="bnt default" @click="
<view class="bnt default" @click="delOrder">删除订单</view>
<view class="bnt bg-color-red" @click="
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
">查看物流</view>
</template>
@ -269,13 +354,14 @@
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
</template>
</view>
<Payment
v-model="pay"
:types="payType"
@checked="toPay"
:balance="userInfo.nowMoney"
></Payment>
<view class="geoPage" v-if="mapShow">
<!-- <view class="geoPage" v-if="mapShow">
<iframe
width="100%"
height="100%"
@ -283,7 +369,7 @@
scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"
></iframe>
</view>
</view> -->
</view>
</template>
@ -318,6 +404,7 @@
},
data: function () {
return {
addBottom: this.addBottom,
offlinePayStatus: 2,
orderTypeName: "普通订单",
orderTypeNameStatus: true,
@ -325,6 +412,7 @@
id: "",
orderInfo: {
_status: {},
realName: '',
},
status: {},
pay: false,
@ -332,8 +420,12 @@
from: this.$deviceType,
system_store: {},
mapKay: "",
mapShow: false,
isIntegral: false
// mapShow: false,
isIntegral: false,
addressInfo: {
area: '',
info: ''
},
};
},
computed: {
@ -378,30 +470,30 @@
}
});
},
showChang: function (data) {
//
this.$yrouter.push({
path: "/pages/map/index",
query: data,
});
// if (isWeixin()) {
// let config = {
// latitude: this.system_store.latitude,
// longitude: this.system_store.longitude,
// name: this.system_store.name,
// address: this.system_store.address
// };
// } else {
// if (!this.mapKey)
// uni.showToast({
// title: "使key",
// icon: "none",
// duration: 2000
// });
// return;
// this.mapShow = true;
// }
},
// showChang: function (data) {
// //
// this.$yrouter.push({
// path: "/pages/map/index",
// query: data,
// });
// // if (isWeixin()) {
// // let config = {
// // latitude: this.system_store.latitude,
// // longitude: this.system_store.longitude,
// // name: this.system_store.name,
// // address: this.system_store.address
// // };
// // } else {
// // if (!this.mapKey)
// // uni.showToast({
// // title: "使key",
// // icon: "none",
// // duration: 2000
// // });
// // return;
// // this.mapShow = true;
// // }
// },
goBack() {
if (this.name === "MyOrder") {
this.$yrouter.back();
@ -511,6 +603,9 @@
this.system_store = res.data.systemStore || {};
this.mapKey = res.data.mapKay;
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
let addressArr = this.orderInfo.userAddress.split(' ');
this.addressInfo.area = addressArr.splice(0, 3).join('');
this.addressInfo.info = addressArr.join(' ');
})
.catch((err) => {
uni.showToast({
@ -530,6 +625,62 @@
</script>
<style scoped lang="less">
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.top-box {
width: 686rpx;
height: 146rpx;
margin: 20rpx 32rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 32rpx;
.icon {
width: 34rpx;
height: 34rpx;
}
.status {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 42rpx;
padding-left: 14rpx;
}
.data {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 32rpx;
text-align: right;
.tip {
font-size: 20rpx;
line-height: 26rpx;
}
}
}
.top-box.on {
background: linear-gradient(135deg, #D4D4D4 0%, #B4B4B4 100%);
}
.geoPage {
position: fixed;
width: 100%;

891
pages/order/OrderReturnDetail/index.vue

@ -1,314 +1,577 @@
<template>
<view class="returnList">
<view class="data bgRed">
<view v-if="orderDetail.salesState === 0">
<view class="state" v-if="orderDetail.state === 0">
已提交申请请耐心等待卖家处理
</view>
<view class="state" v-if="orderDetail.state === 1">
<view class="state" v-if="orderDetail.serviceType === 0">
已通过平台审核,正在退款
</view>
<view class="state" v-if="orderDetail.serviceType === 1">
已通过平台审核 ,请填写退货物流
</view>
</view>
<view class="state" v-if="orderDetail.state === 2">
已发货等待商家审核
</view>
<view class="state" v-if="orderDetail.state === 3">
售后订单已完成
</view>
</view>
<view v-if="orderDetail.salesState === 1">
已撤销售后订单
</view>
<view v-if="orderDetail.salesState === 2">
商家已拒绝售后申请
</view>
</view>
<!-- 退款总金额 -->
<view class="money">
<view class="top">
<text>退款总金额</text>
<text class="colorRed">{{ orderDetail.refundAmount || 0 }}</text>
</view>
<view class="express" v-if="orderDetail.serviceType === 1">
<view class="title">商家已同意退货申请请尽快发货</view>
<view class="info people"> 收货人 {{ orderDetail.consignee || '' }} </view>
<view class="info address"> 收货地址 {{ orderDetail.address || '' }} </view>
<view class="info phone"> 收货电话 {{ orderDetail.phoneNumber || '' }} </view>
</view>
<!-- 退款信息 -->
<view class="tips" v-if="orderDetail.state === 0">
<text class="title">您已成功发起退款申请请耐心等待商家处理</text>
<view class="content">
<view>· 卖家同意或超时未处理系统将退款给您</view>
<view>· 如果卖家拒绝您可以修改退款申请后再次发起卖家会重新处理</view>
</view>
</view>
<!-- 撤销 -->
<!-- <view class="tips" v-if="orderDetail.serviceType === 1 && orderDetail.state >= 2">
<text class="title">您已撤销售后申请</text>
<view class="content">
<view>· </view>
<view>· </view>
</view>
</view> -->
<!-- 商家拒接 -->
<!-- <view class="tips" v-if="orderDetail.serviceType === 2 && orderDetail.state >= 2">
<text class="title">卖家已拒绝</text>
<view class="content">
<view>· </view>
<view>· </view>
</view>
</view> -->
<view class="bottom">
<view class="btns redBtn" v-if="orderDetail.salesState === 0 && orderDetail.serviceType === 1 && orderDetail.state === 1" @click="toExpress">填写物流</view>
<view class="btns def" v-if="orderDetail.salesState === 0" @click="cancelReq">撤销申请</view>
<!-- <view class="btns redBtn" @click="editReq">修改申请</view>-->
</view>
</view>
<!-- 退款信息 -->
<view class="rebackInfo">
<view class="top">
退款信息
</view>
<view class="rebackItem" v-for="item in orderDetail.cartInfo" :key="item.id">
<image class="img" :src="item.productInfo.image" mode=""></image>
<view class="info">
<view class="productName">
{{ item.productInfo.storeName }}
</view>
<view class="sku">
{{ item.productInfo.attrInfo.sku }}
</view>
</view>
</view>
<view class="bottom">
<view class="reason">
<view class="left">
退款原因:
</view>
<view class="right">
{{ orderDetail.reasons || '' }}
</view>
</view>
<view class="reason">
<view class="left">
退款金额:
</view>
<view class="right"> {{ orderDetail.refundAmount || 0 }} </view>
</view>
<view class="reason">
<view class="left">
退款编号:
</view>
<view class="right">
{{ orderDetail.id || '' }}
</view>
</view>
<view class="reason">
<view class="left">
申请时间:
</view>
<view class="right">
{{ orderDetail.createTime || '' }}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getAfterSealsDetail, rebackAfterSeals } from '@/api/aftersales.js'
export default {
data() {
return {
orderId: '',
id: '',
orderInfo: {},
orderDetail: {},
}
},
mounted() {
this.orderId = this.$yroute.query.key
this.id = this.$yroute.query.id
this.getReturnDetail()
},
methods: {
/** state售后状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3已完成 */
async getReturnDetail() {
getAfterSealsDetail(this.orderId, this.id)
.then(res => {
this.orderDetail = res.data
})
.catch(err => {
uni.showToast({
title: '订单异常',
icon: 'none',
duration: 2000,
})
})
},
toExpress() {
this.$yrouter.push({
path: '/pages/order/submitExpress/index',
query: {
orderCode: this.orderId,
},
})
},
//
async cancelReq() {
rebackAfterSeals(this.orderId, this.id)
.then(res => {
uni.showToast({
title: '已撤销',
icon: 'none',
duration: 2000,
})
setTimeout(() => {
this.$yrouter.back()
}, 1500)
})
.catch(err => {
uni.showToast({
title: '撤销失败',
icon: 'none',
duration: 2000,
})
})
},
//
editReq() {},
},
}
</script>
<style scoped lang="scss">
$red: #eb3729;
.returnList {
.colorRed {
color: $red;
}
.bgRed {
background-color: $red;
}
.data {
width: 100%;
height: 150rpx;
line-height: 150rpx;
padding-left: 30rpx;
color: #fff;
}
.money {
background-color: #fff;
.top {
padding: 20rpx 30rpx;
font-size: 30rpx;
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #f3f4f5;
}
.express {
padding: 20rpx 30rpx;
font-size: 26rpx;
.title {
color: #333333;
}
.info {
color: #999999;
}
}
.tips {
height: 160rpx;
padding: 20rpx 30rpx;
color: #999999;
border-bottom: 2rpx solid #f3f4f5;
font-size: 26rpx;
.title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.content {
font-size: 20rpx;
}
}
.bottom {
padding: 20rpx 30rpx;
display: flex;
justify-content: flex-end;
.btns {
width: 160rpx;
height: 58rpx;
margin: 0 10rpx;
font-size: 24rpx;
text-align: center;
line-height: 58rpx;
border-radius: 180rpx;
}
.def {
color: #dddddd;
border: 2rpx solid #dddddd;
}
.redBtn {
color: #fff;
background-color: $red;
}
}
}
.rebackInfo {
padding: 0 30rpx;
background-color: #fff;
.top {
height: 80rpx;
margin: 20rpx 0;
line-height: 80rpx;
font-size: 30rpx;
font-weight: bold;
color: #333333;
border-bottom: 2rpx solid #f3f4f5;
}
.rebackItem {
padding: 20rpx 0;
font-size: 28rpx;
display: flex;
border-bottom: 2rpx solid #f3f4f5;
.img {
width: 120rpx;
height: 120rpx;
}
.info {
margin-left: 16rpx;
flex: 1;
.productName {
width: 100%;
height: 80rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #333333;
}
.sku {
font-size: 24rpx;
color: #cccccc;
}
}
}
.bottom {
padding: 20rpx 0;
.reason {
font-size: 28rpx;
color: #333333;
display: flex;
justify-content: space-between;
.right {
color: #aaaaaa;
}
}
}
}
}
</style>
<template>
<view class="returnList">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">售后详情</view>
</block>
</cu-custom>
</view>
<view class="content-box">
<view class="top-info">
<view>服务单号{{orderDetail.orderCode}}</view>
<view>申请时间{{orderDetail.createTime}}</view>
</view>
<view class="current-progress-title acea-row row-between-wrapper">
<view class="progress-title">当前进度</view>
<!-- <view class=""></view> -->
<view v-if="orderDetail.salesState === 0">
<view class="progress-text" v-if="orderDetail.state === 0">已提交申请请耐心等待卖家处理</view>
<view v-if="orderDetail.state === 1">
<view class="progress-text" v-if="orderDetail.serviceType === 0">已通过平台审核,正在退款</view>
<!-- <view class="progress-text" v-if="orderDetail.serviceType === 1">已通过平台审核 ,请填写退货物流</view> -->
</view>
<view class="progress-text" v-if="orderDetail.state === 2">等待商家审核</view>
<!-- <view class="progress-text" v-if="orderDetail.state === 2">已发货等待商家审核</view> -->
<view class="progress-text" v-if="orderDetail.state === 3">售后订单已完成</view>
</view>
<view class="progress-text" v-if="orderDetail.salesState === 1">已撤销售后订单</view>
<view class="progress-text" v-if="orderDetail.salesState === 2">商家已拒绝售后申请</view>
</view>
<view class="current-progress acea-row row-between">
<!-- <view class="current-progress acea-row"> -->
<view class="item" v-for="(item,index) in returnStateLs" :key="index">
<view class="tips-box">
<view class="acea-row row-column row-middle" v-if="orderDetail.salesState === 0 && (orderDetail.state == item.state)">
<view class="box">{{item.tip}}</view>
<view class="jiantou"></view>
</view>
<view class="acea-row row-column row-middle" v-else-if="orderDetail.salesState === 1 && (index == 0)">
<view class="box">已撤销</view>
<view class="jiantou"></view>
</view>
<view class="acea-row row-column row-middle" v-else-if="orderDetail.salesState === 2 && (index == 1)">
<view class="box">已拒绝</view>
<view class="jiantou"></view>
</view>
</view>
<view class="state-box" :style="item.stateText == '处理完成'?'margin-right: 0rpx;':''">
<view class="state">{{item.stateText}}</view>
</view>
</view>
<view class="line"></view>
</view>
<view class="info-item">
<view class="title">问题描述</view>
<view class="info">{{orderDetail.explains}}</view>
</view>
<view class="info-item" v-if="orderDetail.explainImg">
<view class="title">图片凭证</view>
<view class="acea-row">
<image :src="item" mode="" v-for="(item, index) in orderDetail.explainImg" :key="index"></image>
</view>
</view>
</view>
<!-- <view class="data bgRed">
<view v-if="orderDetail.salesState === 0">
<view class="state" v-if="orderDetail.state === 0">
已提交申请请耐心等待卖家处理
</view>
<view class="state" v-if="orderDetail.state === 1">
<view class="state" v-if="orderDetail.serviceType === 0">
已通过平台审核,正在退款
</view>
<view class="state" v-if="orderDetail.serviceType === 1">
已通过平台审核 ,请填写退货物流
</view>
</view>
<view class="state" v-if="orderDetail.state === 2">
已发货等待商家审核
</view>
<view class="state" v-if="orderDetail.state === 3">
售后订单已完成
</view>
</view>
<view v-if="orderDetail.salesState === 1">
已撤销售后订单
</view>
<view v-if="orderDetail.salesState === 2">
商家已拒绝售后申请
</view>
</view> -->
<!-- 退款总金额 -->
<!-- <view class="money"> -->
<!-- <view class="top">
<text>退款总金额</text>
<text class="colorRed">{{ orderDetail.refundAmount || 0 }}</text>
</view>
<view class="express" v-if="orderDetail.serviceType === 1">
<view class="title">商家已同意退货申请请尽快发货</view>
<view class="info people"> 收货人 {{ orderDetail.consignee || '' }} </view>
<view class="info address"> 收货地址 {{ orderDetail.address || '' }} </view>
<view class="info phone"> 收货电话 {{ orderDetail.phoneNumber || '' }} </view>
</view> -->
<!-- 退款信息 -->
<!-- <view class="tips" v-if="orderDetail.state === 0">
<text class="title">您已成功发起退款申请请耐心等待商家处理</text>
<view class="content">
<view>· 卖家同意或超时未处理系统将退款给您</view>
<view>· 如果卖家拒绝您可以修改退款申请后再次发起卖家会重新处理</view>
</view>
</view> -->
<!-- 撤销 -->
<!-- <view class="tips" v-if="orderDetail.serviceType === 1 && orderDetail.state >= 2">
<text class="title">您已撤销售后申请</text>
<view class="content">
<view>· </view>
<view>· </view>
</view>
</view> -->
<!-- 商家拒接 -->
<!-- <view class="tips" v-if="orderDetail.serviceType === 2 && orderDetail.state >= 2">
<text class="title">卖家已拒绝</text>
<view class="content">
<view>· </view>
<view>· </view>
</view>
</view> -->
<!-- <view class="bottom">
<view class="btns redBtn" v-if="orderDetail.salesState === 0 && orderDetail.serviceType === 1 && orderDetail.state === 1" @click="toExpress">填写物流</view>
<view class="btns def" v-if="orderDetail.salesState === 0" @click="cancelReq">撤销申请</view>
<view class="btns redBtn" @click="editReq">修改申请</view>
</view> -->
<!-- </view> -->
<!-- 退款信息 -->
<!-- <view class="rebackInfo">
<view class="top">
退款信息
</view>
<view class="rebackItem" v-for="item in orderDetail.cartInfo" :key="item.id">
<image class="img" :src="item.productInfo.image" mode=""></image>
<view class="info">
<view class="productName">
{{ item.productInfo.storeName }}
</view>
<view class="sku">
{{ item.productInfo.attrInfo.sku }}
</view>
</view>
</view>
<view class="bottom">
<view class="reason">
<view class="left">
退款原因:
</view>
<view class="right">
{{ orderDetail.reasons || '' }}
</view>
</view>
<view class="reason">
<view class="left">
退款金额:
</view>
<view class="right"> {{ orderDetail.refundAmount || 0 }} </view>
</view>
<view class="reason">
<view class="left">
退款编号:
</view>
<view class="right">
{{ orderDetail.id || '' }}
</view>
</view>
<view class="reason">
<view class="left">
申请时间:
</view>
<view class="right">
{{ orderDetail.createTime || '' }}
</view>
</view>
</view>
</view> -->
</view>
</template>
<script>
import { getAfterSealsDetail, rebackAfterSeals } from '@/api/aftersales.js'
export default {
data() {
return {
orderId: '',
id: '',
orderInfo: {},
orderDetail: {},
returnStateLs: [
{
stateText: '提交申请',
tip: '已申请',
state: 0
},
{
stateText: '申请审核',
tip: '已审核',
state: 1
},
// {
// stateText: '',
// tip: '',
// state: 2,
// serviceType: 1
// },
// {
// stateText: '退',
// tip: '退',
// state: 1,
// serviceType: 0
// },
{
stateText: '进行退款',
tip: '已退款',
state: 2,
},
{
stateText: '处理完成',
tip: '已完成',
state: 3
},
]
}
},
mounted() {
this.orderId = this.$yroute.query.key
this.id = this.$yroute.query.id
this.getReturnDetail()
},
methods: {
/** state售后状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3已完成 */
async getReturnDetail() {
getAfterSealsDetail(this.orderId, this.id)
.then(res => {
this.orderDetail = res.data;
this.orderDetail.explainImg = res.data.explainImg.split(',')
})
.catch(err => {
uni.showToast({
title: '订单异常',
icon: 'none',
duration: 2000,
})
})
},
toExpress() {
this.$yrouter.push({
path: '/pages/order/submitExpress/index',
query: {
orderCode: this.orderId,
},
})
},
//
async cancelReq() {
rebackAfterSeals(this.orderId, this.id)
.then(res => {
uni.showToast({
title: '已撤销',
icon: 'none',
duration: 2000,
})
setTimeout(() => {
this.$yrouter.back()
}, 1500)
})
.catch(err => {
uni.showToast({
title: '撤销失败',
icon: 'none',
duration: 2000,
})
})
},
//
editReq() {},
},
}
</script>
<style scoped lang="less">
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
margin: 20rpx 32rpx;
padding: 20rpx 20rpx;
// width: 343px;
// height: 427px;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.top-info {
padding-bottom: 30rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
view:first-child {
padding-bottom: 6rpx;
}
}
.current-progress-title {
width: 646rpx;
height: 56rpx;
padding: 0rpx 16rpx;
border-radius: 16rpx;
border: 2rpx solid #2DB5AE;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 32rpx;
.progress-title {
padding-right: 14rpx;
border-right: 2rpx solid #2DB5AE;
}
.progress-text {
width: 484rpx;
font-weight: 500;
}
}
}
.current-progress {
padding-top: 20rpx;
position: relative;
.item {
position: relative;
z-index: 1;
.tips-box {
width: 80rpx;
height: 48rpx;
margin-left: 6rpx;
margin-bottom: 8rpx;
.box {
width: 80rpx;
height: 36rpx;
background-color: #2DB5AE;
border-radius: 16rpx;
font-size: 18rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
}
.jiantou {
width: 0;
height: 0;
border-top: 12rpx solid #2DB5AE;
border-left: 6rpx solid transparent;
border-bottom: 0rpx solid transparent;
border-right: 6rpx solid transparent;
}
}
.state-box {
width: 92rpx;
height: 92rpx;
background: linear-gradient(rgba(27, 141, 204, 1), rgba(45, 183, 173, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
padding: 4rpx;
// margin-right: 42rpx;
.state {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
border-radius: 50%;
font-size: 18rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 84rpx;
text-align: center;
}
}
}
.line {
position: absolute;
top: 120rpx;
left: 86rpx;
z-index: 0;
width: 474rpx;
height: 6rpx;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
}
}
.content-box .info-item {
font-family: PingFang SC;
font-weight: 500;
.title {
font-size: 30rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 42rpx;
padding: 24rpx 0rpx 10rpx;
}
.info {
font-size: 24rpx;
color: #999999;
line-height: 32rpx;
}
image {
width: 204rpx;
height: 204rpx;
border-radius: 16rpx;
// background: #dddddd;
margin-right: 17rpx;
}
image:last-child {
margin-right: 0rpx;
}
}
@red: #2DB5AE;
.returnList {
.colorRed {
color: @red;
}
.bgRed {
background-color: @red;
}
.data {
width: 100%;
height: 150rpx;
line-height: 150rpx;
padding-left: 30rpx;
color: #fff;
}
.money {
background-color: #fff;
.top {
padding: 20rpx 30rpx;
font-size: 30rpx;
display: flex;
justify-content: space-between;
border-bottom: 2rpx solid #f3f4f5;
}
.express {
padding: 20rpx 30rpx;
font-size: 26rpx;
.title {
color: #333333;
}
.info {
color: #999999;
}
}
.tips {
height: 160rpx;
padding: 20rpx 30rpx;
color: #999999;
border-bottom: 2rpx solid #f3f4f5;
font-size: 26rpx;
.title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.content {
font-size: 20rpx;
}
}
.bottom {
padding: 20rpx 30rpx;
display: flex;
justify-content: flex-end;
.btns {
width: 160rpx;
height: 58rpx;
margin: 0 10rpx;
font-size: 24rpx;
text-align: center;
line-height: 58rpx;
border-radius: 180rpx;
}
.def {
color: #dddddd;
border: 2rpx solid #dddddd;
}
.redBtn {
color: #fff;
background-color: @red;
}
}
}
.rebackInfo {
padding: 0 30rpx;
background-color: #fff;
.top {
height: 80rpx;
margin: 20rpx 0;
line-height: 80rpx;
font-size: 30rpx;
font-weight: bold;
color: #333333;
border-bottom: 2rpx solid #f3f4f5;
}
.rebackItem {
padding: 20rpx 0;
font-size: 28rpx;
display: flex;
border-bottom: 2rpx solid #f3f4f5;
.img {
width: 120rpx;
height: 120rpx;
}
.info {
margin-left: 16rpx;
flex: 1;
.productName {
width: 100%;
height: 80rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #333333;
}
.sku {
font-size: 24rpx;
color: #cccccc;
}
}
}
.bottom {
padding: 20rpx 0;
.reason {
font-size: 28rpx;
color: #333333;
display: flex;
justify-content: space-between;
.right {
color: #aaaaaa;
}
}
}
}
}
</style>

460
pages/order/OrderSubmission/index.vue

@ -1,12 +1,27 @@
<template>
<view class="order-submission">
<view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'">
<view class="nav acea-row">
<!-- <view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view> -->
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">订单详情</view>
</block>
</cu-custom>
</view>
<!-- <view class="allAddress"> -->
<!-- <view class="allAddress" :style="systemStore ? '' : 'padding-top: 0.2*100rpx'"> -->
<!-- <view class="nav acea-row">
<view class="item font-color-red" :class="shipping_type === 0 ? 'on' : 'on2'" @click="addressType(0)" v-if="systemStore"></view>
<view class="item font-color-red" :class="shipping_type === 1 ? 'on' : 'on2'" @click="addressType(1)" v-if="systemStore && !isIntegral"></view>
</view>
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap">
<view class="addressCon" v-if="addressInfo.realName">
</view> -->
<view class="address" @click="addressTap">
<!-- <view class="address acea-row row-between-wrapper" v-if="shipping_type === 0" @click="addressTap"> -->
<!-- <view class="addressCon" v-if="addressInfo.realName">
<view class="name">
{{ addressInfo.realName }}
<text class="phone">{{ addressInfo.phone }}</text>
@ -15,13 +30,23 @@
<text class="default font-color-red" v-if="addressInfo.isDefault">[默认]</text>
{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }}
</view>
</view> -->
<view class="addressCon acea-row row-between-wrapper">
<!-- <view class="addressCon" v-else> -->
<view class="address-info" v-if="addressInfo.realName">
<view class="">{{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}</view>
<view class="detail">{{ addressInfo.detail }}</view>
<view class="name">
{{ addressInfo.realName }}
<text class="phone">{{ addressInfo.phone }}</text>
</view>
</view>
<view class="setaddress" v-else>设置地址</view>
<image src="../../../static/images/right.png" mode=""></image>
</view>
<view class="addressCon" v-else>
<view class="setaddress">设置地址</view>
</view>
<view class="iconfont icon-jiantou"></view>
<!-- <view class="iconfont icon-jiantou"></view> -->
</view>
<view class="address acea-row row-between-wrapper" v-if="shipping_type === 1" @click="showStoreList">
<!-- <view class="address acea-row row-between-wrapper" v-if="shipping_type === 1" @click="showStoreList">
<view class="addressCon" v-if="storeItems">
<view class="name">
{{ storeItems.name }}
@ -37,26 +62,37 @@
<view>{{ systemStore.address }}</view>
</view>
<view class="iconfont icon-jiantou"></view>
</view>
<view class="line">
</view> -->
<!-- <view class="line">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" />
</view>
</view>
</view> -->
<!-- </view> -->
<OrderGoods :evaluate="0" :isIntegral="isIntegral" :cartInfo="orderGroupInfo.cartInfo"></OrderGoods>
<view class="coupon-box" v-if="deduction === false && !isIntegral">
<view class="item acea-row row-between-wrapper" @click="couponTap">
<view class="coupon-info acea-row row-between-wrapper">
<view>{{ usableCoupon.couponTitle || '选择优惠券' }}</view>
<view class="coupon-value" v-if="usableCoupon.cname">-¥{{usableCoupon.couponPrice}}</view>
</view>
<image src="../../../static/images/right.png" mode=""></image>
</view>
</view>
<view class="wrapper">
<view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false && !isIntegral">
<!-- <view class="item acea-row row-between-wrapper" @click="couponTap" v-if="deduction === false && !isIntegral">
<view>优惠券</view>
<view class="discount">
{{ usableCoupon.couponTitle || '请选择' }}
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view> -->
<view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true">
<view>积分抵扣</view>
<view class="discount">
<view class="select-btn">
<view class="checkbox-wrapper">
<!-- <input type="checkbox" v-model="useIntegral" @click="changeUseIntegral"/> -->
<checkbox-group @change="changeUseIntegral">
<label class="well-check">
<text class="integral">
@ -70,10 +106,12 @@
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>配送费用</view>
<view class="item postage acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view>
<view class="discount">
{{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }}
{{orderPrice.payPostage > 0 ? '¥'+orderPrice.payPostage: '包邮'}}
<!-- {{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '包邮' }} -->
</view>
</view>
<view v-if="shipping_type === 1">
@ -91,22 +129,32 @@
</view>
</view>
<view class="item">
<view>备注信息150字以内</view>
<textarea v-model="mark"></textarea>
<view>备注信息</view>
<view class="textarea-box acea-row">
<image src="../../../static/images/write-icon.png" mode=""></image>
<textarea auto-height v-model="mark" maxlength="150" placeholder="添加备注信息"></textarea>
<view class="wordNum">{{mark.length}}/150</view>
</view>
</view>
</view>
<view class="wrapper">
<view class="item">
<view>支付方式</view>
<view class="list">
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" v-show="isWeixin">
<view class="weixinPay" v-if="!isIntegral" @click="payItem('weixin')">
<image class="logo" src="../../../static/images/wx-logo.png" mode=""></image>
<image class="check" src="../../../static/images/check-circle.png" mode=""></image>
<view class="">微信支付</view>
</view>
<!-- <view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" v-show="isWeixin">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view>
</view>
<view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'weixin' ? 'on' : ''" @click="payItem('weixin')" v-show="!isWeixin">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-weixin2" :class="active === 'weixin' ? 'bounceIn' : ''"></view>微信支付 </view>
<view class="tip">微信快捷支付</view>
</view>
</view> -->
<!-- <view class="payItem acea-row row-middle" v-if="!isIntegral" :class="active === 'yue' ? 'on' : ''" @click="payItem('yue')">
<view class="name acea-row row-center-wrapper"> <view class="iconfont icon-icon-test" :class="active === 'yue' ? 'bounceIn' : ''"></view>余额支付 </view>
<view class="tip">可用余额{{ userInfo.nowMoney || 0 }}</view>
@ -118,7 +166,8 @@
</view>
</view>
</view>
<view class="moneyList">
<!-- <view class="moneyList">
<view class="item acea-row row-between-wrapper" v-if="orderPrice.totalPrice !== undefined">
<view>商品总价</view>
<view class="money" v-if="!isIntegral">{{ orderPrice.totalPrice }}</view>
@ -136,13 +185,14 @@
<view>积分抵扣</view>
<view class="money">-{{ orderPrice.deductionPrice }}</view>
</view>
</view>
<view style="height: 120rpx"></view>
<view class="footer acea-row row-between-wrapper">
<view>
合计:
<text class="font-color-red" v-if="!isIntegral">{{ orderPrice.payPrice }}</text>
<text class="font-color-red" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text>
</view> -->
<view :style="addBottom?'height: 160rpx;':'height: 120rpx'"></view>
<view class="footer acea-row row-between" :style="addBottom?'':'height: 120rpx'">
<view class="price-box">
合计
<text class="price font-color-red" v-if="!isIntegral">¥{{ orderPrice.payPrice }}</text>
<text class="price font-color-red" v-if="isIntegral">{{ orderPrice.payIntegral }}积分</text>
</view>
<view class="settlement" @click="createOrder">立即结算</view>
</view>
@ -151,102 +201,228 @@
</view>
</template>
<style scoped lang="less">
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 0.15 * 100rpx;
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.order-submission .address {
image {
width: 30rpx;
height: 30rpx;
}
.address-info {
width: 578rpx;
padding: 12rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
.detail {
font-size: 26rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 38rpx;
padding: 6rpx 0rpx;
}
}
}
.order-submission .coupon-box {
margin: 0rpx 32rpx 20rpx;
padding: 24rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.item {
width: 100%;
padding: 12rpx 16rpx 12rpx 12rpx;
background: #F1F1F1;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 38rpx;
image {
width: 30rpx;
height: 30rpx;
}
.coupon-info {
width: 566rpx;
.coupon-value {
font-size: 24rpx;
font-weight: 500;
line-height: 32rpx;
}
}
}
}
.order-submission .wrapper .postage {
padding-bottom: 24rpx;
margin-bottom: 24rpx;
border-bottom: 2rpx solid #979797;
}
.order-submission .wrapper .item{
.textarea-box {
box-sizing: border-box;
width: 100%;
min-height: 116rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
margin-top: 20rpx;
padding: 16rpx 16rpx 44rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
position: relative;
image {
width: 32rpx;
height: 32rpx;
}
.wordNum {
position: absolute;
bottom: 16rpx;
right: 16rpx;
color: #999999;
}
}
.weixinPay {
position: relative;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
.logo {
width: 74rpx;
height: 74rpx;
}
.check {
width: 30rpx;
height: 30rpx;
position: absolute;
top: 46rpx;
left: 46rpx;
}
}
}
.order-submission .wrapper .shipping select {
color: #999;
padding-right: 0.15 * 100rpx;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3 * 100rpx;
color: #515151;
}
.order-submission .wrapper .shipping .iconfont {
font-size: 0.3 * 100rpx;
color: #515151;
}
.order-submission .allAddress {
width: 100%;
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -webkit-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
padding-top: 1 * 100rpx;
}
/* .order-submission .allAddress {
width: 100%;
background-image: linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -webkit-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
background-image: -moz-linear-gradient(to bottom, #eb3729 0%, #eb3729 100%);
padding-top: 1 * 100rpx;
}
.order-submission .allAddress .nav {
margin: 0 auto;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
.order-submission .allAddress .nav {
margin: 0 auto;
padding: 0 30rpx;
width: 100%;
box-sizing: border-box;
}
.order-submission .allAddress .nav .item {
flex: 1;
position: relative;
}
.order-submission .allAddress .nav .item {
flex: 1;
position: relative;
}
.order-submission .allAddress .nav .item.on {
position: relative;
}
.order-submission .allAddress .nav .item.on {
position: relative;
}
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
content: '免费送货';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #fff;
z-index: 9;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item.on:before {
position: absolute;
bottom: 0;
content: '免费送货';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #fff;
z-index: 9;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: '到店自提';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(2).on:before {
content: '到店自提';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
.order-submission .allAddress .nav .item.on2 {
position: relative;
}
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: '到店自提';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #d5e6e6;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item.on2:before {
position: absolute;
bottom: 0;
content: '到店自提';
font-size: 0.28 * 100rpx;
display: block;
height: 0;
left: 0;
right: 0;
border-width: 0.4 * 100rpx;
border-style: solid;
border-color: #d5e6e6;
text-align: center;
line-height: 0.14 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: '快递配送';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .nav .item:nth-of-type(1).on2:before {
content: '快递配送';
border-width: 0.4 * 100rpx;
}
.order-submission .allAddress .address {
width: 6.91 * 100rpx;
height: 1.5 * 100rpx;
margin: 0 auto;
box-sizing: border-box;
}
.order-submission .allAddress .address {
width: 6.91 * 100rpx;
height: 1.5 * 100rpx;
margin: 0 auto;
box-sizing: border-box;
}
.order-submission .allAddress .line {
width: 7.1 * 100rpx;
margin: 0 auto;
}
.order-submission .allAddress .line {
width: 7.1 * 100rpx;
margin: 0 auto;
} */
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
.order-submission .wrapper .item .discount input::placeholder {
color: #ccc;
}
</style>
<script>
import OrderGoods from '@/components/OrderGoods'
@ -270,6 +446,7 @@ export default {
props: {},
data: function() {
return {
addBottom: this.addBottom,
offlinePayStatus: 2,
from: this.$deviceType,
deduction: true,
@ -293,7 +470,8 @@ export default {
},
mark: '',
systemStore: {},
shipping_type: 1,
shipping_type: 0,
// shipping_type: 1,
contacts: '',
contactsTel: '',
storeSelfMention: 0,
@ -336,18 +514,18 @@ export default {
path: '/pages/shop/StoreList/index',
})
},
addressType: function(index) {
if (index && !this.systemStore.id) {
uni.showToast({
title: '暂无门店信息,您无法选择到店自提!',
icon: 'none',
duration: 2000,
})
return
}
console.log(this)
this.shipping_type = index
},
// addressType: function(index) {
// if (index && !this.systemStore.id) {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000,
// })
// return
// }
// console.log(this)
// this.shipping_type = index
// },
changeUseIntegral: function(e) {
// this.computedPrice();
if (this.isIntegral) {
@ -391,6 +569,9 @@ export default {
})
return this.$yrouter.back()
}
uni.showLoading({
title: ''
})
postOrderConfirm(cartIds)
.then(res => {
this.offlinePayStatus = res.data.offline_pay_status
@ -401,7 +582,8 @@ export default {
//
this.systemStore = res.data.systemStore || {}
this.storeSelfMention = res.data.storeSelfMention
this.computedPrice()
this.computedPrice();
uni.hideLoading();
})
.catch((error) => {
console.log(error)
@ -444,15 +626,15 @@ export default {
this.addressInfo = addressInfo
this.computedPrice()
},
createOrder() {
// if (this.orderPrice.payPrice < 19){
// uni.showToast({
// title: '19.',
// icon: 'none',
// duration: 2000,
// })
// return
// }
createOrder() {
// if (this.orderPrice.payPrice < 19){
// uni.showToast({
// title: '19.',
// icon: 'none',
// duration: 2000,
// })
// return
// }
if (this.isIntegral) {
//

165
pages/order/ReturnList/index.vue

@ -1,31 +1,48 @@
<template>
<view class="return-list" ref="container">
<!-- 分类查询 -->
<view class="nav">
<view class="item" :class="{ on: listQuery.type === 0 }" @click="changeType(0)">
<view>全部</view>
</view>
<view class="item" :class="{ on: listQuery.type === 1 }" @click="changeType(1)">
<view>售后中</view>
</view>
<view class="item" :class="{ on: listQuery.type === 2 }" @click="changeType(2)">
<view>已完成</view>
</view>
</view>
<!-- 商品列表 -->
<view class="list">
<ListItem
v-for="(item,index) in orderList"
:key="index"
:item="item"
/>
</view>
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noOrder.png`" />
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">售后服务</view>
</block>
</cu-custom>
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<!-- 分类查询 -->
<view class="nav-box" :style="'top:'+ CustomBar +'px;'">
<view class="nav acea-row row-around">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (listQuery.type == 0? 'active' : '')">全部</view>
</view>
<view class="item" @click="changeType(1)">
<view :class="'title ' + (listQuery.type == 1? 'active' : '')">售后中</view>
</view>
<view class="item" @click="changeType(2)">
<view :class="'title ' + (listQuery.type == 2? 'active' : '')">已完成</view>
</view>
</view>
</view>
<!-- 商品列表 -->
<view class="list">
<ListItem
v-for="(item,index) in orderList"
:key="index"
:item="item"
/>
<Loading v-if="orderList.length !== 0" :loaded="loaded" :loading="loading"></Loading>
</view>
<view class="noCart" v-if="orderList.length === 0 && listQuery.page > 1">
<image class="pictrue" :src="`${$VUE_APP_RESOURCES_URL}/images/noOrder.png`" mode="widthFix"/>
</view>
</view>
</view>
</template>
@ -43,6 +60,7 @@ export default {
},
data() {
return {
CustomBar: this.CustomBar,
orderList: [],
listQuery: {
page: 1,
@ -91,21 +109,92 @@ export default {
</script>
<style scoped lang="scss">
.return-list{
.nav{
background-color: #FFF;
display: flex;
justify-content: space-around;
.item{
height: 80rpx;
line-height: 80rpx;
font-size: 14px;
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
color: #333333;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content {
width: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.list {
padding-top: 108rpx;
}
.on{
border-bottom: 6rpx solid #EB3729;
}
.return-list{
.nav{
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
width: 112rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
.noCart {
padding-top: 100rpx;
text-align: center;
.pictrue {
width: 446rpx;
margin: 0rpx auto;
}
}
</style>

438
pages/order/ReturnList/listItem.vue

@ -1,184 +1,254 @@
<!-- 售后列表内容 -->
<template>
<view class="productItem">
<view class="title">
<view class="shopName">
订单号{{ item.orderCode }}
</view>
</view>
<view class="content" v-for="(i, index) in item.cartInfo">
<image class="img"
:src="i.productInfo.image"
mode=""
@click.stop="goGoodsCon(i)"
></image>
<view class="info">
<view class="infoTitle">
{{ i.productInfo.storeName }}
</view>
<view class="infoSku">
<view class="sku">
{{ i.productInfo.attrInfo.sku || '' }}
</view>
<view class="num">
x {{ 1 }}
</view>
</view>
<view class="infoMoney">
退款<view class="red">
{{ i.productInfo.price }}
</view>
</view>
</view>
</view>
<view class="money">
<view class="status">
<view v-if="item.salesState === 0">
<view v-if="item.state === 0">商家处理中</view>
<view v-if="item.state === 1">售后中</view>
<view v-if="item.state === 2">等待商家收货</view>
<view v-if="item.state === 3">已完成</view>
</view>
<view v-if="item.salesState === 1">
已撤销
</view>
<view v-if="item.salesState === 2">
商家拒绝
</view>
</view>
<view class="refundMoney">
退款<view class="red">
{{ item.refundAmount }}
</view>
</view>
</view>
<view class="btns">
<view class="button def"
@click="toDetail"
v-if="item.state === 2"
>删除记录</view>
<view class="button redBtn" @click="toDetail(item)">查看详情</view>
</view>
</view>
</template>
<script>
import {
deleteAfterSeals
} from '@/api/aftersales.js'
export default {
props: {
item: {
type: Object,
default: () => ({})
}
},
methods:{
//
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
query: { id: item.productInfo.id }
});
},
//
toDetail (item) {
console.log(item)
this.$yrouter.push({
path: "/pages/order/OrderReturnDetail/index",
query: {
key: item.orderCode,
id: item.id
}
});
}
}
}
</script>
<style lang="scss" scoped>
.productItem{
margin: 10rpx 0;
background-color: #FFF;
.title{
height: 80rpx;
padding: 0 30rpx;
color: #333;
font-size: 28rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.content{
padding: 20rpx 30rpx;
border: 2rpx solid #F3F4F5;
display: flex;
.img{
width: 180rpx;
height: 180rpx;
}
.info{
flex: 1;
margin-left: 16rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.infoTitle{
width: 100%;
height: 80rpx;
font-size: 28rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
}
.infoSku{
font-size: 24rpx;
color: #999999;
display: flex;
justify-content: space-between;
}
.infoMoney{
font-size: 24rpx;
}
}
}
.money{
height: 80rpx;
padding: 0 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
color: #333333;
border: 2rpx solid #F3F4F5;
display: flex;
justify-content: space-between;
align-items: center;
}
.btns{
padding: 20rpx 30rpx;
display: flex;
justify-content: flex-end;
.button{
width: 160rpx;
height: 58rpx;
margin: 0 10rpx;
border-radius: 180rpx;
font-size: 24rpx;
line-height: 54rpx;
text-align: center;
}
.def{
color: #DDD;
border: 2rpx solid #DDDDDD;
}
.redBtn{
color: #FFF;
background-color: #EB3729;
border: 2rpx solid #EB3729;
}
}
.red{
display: inline-block;
color: #EB3729;
}
}
</style>
<!-- 售后列表内容 -->
<template>
<view class="productItem">
<view class="title acea-row row-between-wrapper">
<view class="shopName">订单编号:{{ item.orderCode }}</view>
<view class="">申请时间:{{item.createTime}}</view>
</view>
<view class="content acea-row" v-for="(i, index) in item.cartInfo" :key="i.id">
<image class="img"
:src="i.productInfo.image"
mode="aspectFill"
@click.stop="goGoodsCon(i)"
></image>
<view class="info">
<view class="infoTitle line1">
{{ i.productInfo.storeName }}
</view>
<view class="acea-row">
<view class="sku">{{ i.productInfo.attrInfo.sku || '' }}</view>
</view>
<view class="money-num acea-row row-between">
<view>{{ i.productInfo.price }}</view>
<view class="num">x{{ i.cartNum }}</view>
</view>
<!-- <view class="infoSku">
<view class="sku">
{{ i.productInfo.attrInfo.sku || '' }}
</view>
<view class="num">
x {{ 1 }}
</view>
</view> -->
<!-- <view class="infoMoney">
退款<view class="red">
{{ i.productInfo.price }}
</view>
</view> -->
</view>
</view>
<view class="money acea-row row-between-wrapper">
<view class="status">
<view v-if="item.salesState === 0">
<view v-if="item.state === 0">商家处理中</view>
<view v-if="item.state === 1">售后中</view>
<view v-if="item.state === 2">等待商家收货</view>
<view v-if="item.state === 3">已完成</view>
</view>
<view v-if="item.salesState === 1">
已撤销
</view>
<view v-if="item.salesState === 2">
商家拒绝
</view>
</view>
<view class="btns">
<view class="button redBtn" @click="toDetail(item)">查看详情</view>
</view>
<!-- <view class="refundMoney">
退款<view class="red">
{{ item.refundAmount }}
</view>
</view> -->
</view>
<!-- <view class="btns">
<view class="button def"
@click="toDetail"
v-if="item.state === 2"
>删除记录</view>
<view class="button redBtn" @click="toDetail(item)">查看详情</view>
</view> -->
</view>
</template>
<script>
import {
deleteAfterSeals
} from '@/api/aftersales.js'
export default {
props: {
item: {
type: Object,
default: () => ({})
}
},
methods:{
//
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
query: { id: item.productInfo.id }
});
},
//
toDetail (item) {
console.log(item)
this.$yrouter.push({
path: "/pages/order/OrderReturnDetail/index",
query: {
key: item.orderCode,
id: item.id
}
});
}
}
}
</script>
<style lang="scss" scoped>
.productItem{
margin: 20rpx 32rpx;
padding: 20rpx;
// width: 343px;
// height: 291px;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
// background-color: #FFF;
.title{
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 26rpx;
padding-bottom: 34rpx;
// height: 80rpx;
// padding: 0 30rpx;
// color: #333;
// font-size: 28rpx;
// display: flex;
// justify-content: space-between;
// align-items: center;
}
.content{
padding-bottom: 20rpx;
// padding: 20rpx 30rpx;
// border: 2rpx solid #F3F4F5;
// display: flex;
.img {
width: 164rpx;
height: 164rpx;
border-radius: 12rpx;
}
.info {
// flex: 1;
width: 462rpx;
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.infoTitle{
width: 100%;
height: 42rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
margin-bottom: 18rpx;
// overflow: hidden;
// text-overflow: ellipsis;
}
.sku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
color: #999999;
line-height: 46rpx;
}
.money-num {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
padding-top: 18rpx;
.num {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 32rpx;
}
}
// .infoSku{
// font-size: 24rpx;
// color: #999999;
// display: flex;
// justify-content: space-between;
// }
// .infoMoney{
// font-size: 24rpx;
// }
}
}
.money{
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
// height: 80rpx;
// padding: 0 30rpx;
// font-size: 28rpx;
// font-family: PingFang SC;
// color: #333333;
// border: 2rpx solid #F3F4F5;
// display: flex;
// justify-content: space-between;
// align-items: center;
}
.btns{
// padding: 20rpx 30rpx;
// display: flex;
// justify-content: flex-end;
.button{
width: 166rpx;
height: 52rpx;
border-radius: 16rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 48rpx;
// width: 160rpx;
// height: 58rpx;
// margin: 0 10rpx;
// border-radius: 180rpx;
// font-size: 24rpx;
// line-height: 54rpx;
text-align: center;
}
.def{
color: #DDD;
border: 2rpx solid #DDDDDD;
}
.redBtn{
// color: #FFF;
// background-color: #2DB5AE;
border: 2rpx solid #2DB5AE;
}
}
.red{
display: inline-block;
color: #2DB5AE;
}
}
</style>

239
pages/shop/EvaluateList/index.vue

@ -1,7 +1,71 @@
<template>
<view class="evaluate-list" ref="container">
<view class="header">
<view class="generalComment acea-row row-between-wrapper">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">评论列表</view>
</block>
</cu-custom>
<view class="nav acea-row row-between-wrapper">
<view class="" v-for="(item, navListIndex) in navList" :key="navListIndex" @click="changeType(navListIndex)" >
<view class="item" :class="currentActive === navListIndex ? 'bg-color-red' : ''">
<text>{{ item.evaluate }}{{ item.num || '' }}</text>
</view>
</view>
</view>
</view>
<view style="height: 80rpx;"></view>
<view class="list" :style="'margin-top:'+ CustomBar +'px;'">
<view class="item" v-for="(item,index) in reply" :key="index">
<view class="pic-text acea-row row-between">
<view class="acea-row">
<image v-if="item.avatar" class="image" :src="item.avatar"/>
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="@/static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
<view class="">
<view class="acea-row row-middle">
<view class="name one-t">{{ item.nickname || '微信用户' }}</view>
<!-- <view class="vip"></view> -->
</view>
<view class="starBox acea-row">
<image src="@/static/images/min-star-light.png" v-for="starItem in item.star" :key="starItem"></image>
<image src="@/static/images/star-border-light.png" v-for="starItem in 5-item.star" :key="starItem"></image>
<!-- <image src="@/static/images/min-star.png" v-for="starItem in 5-item.star" :key="starItem"></image> -->
</view>
</view>
</view>
<view class="time">{{item.createTime}}</view>
</view>
<view class="evaluate-infor">{{ item.comment }}</view>
<view class="imgList acea-row" v-if="item.picturesArr.length >= 3 && item.picturesArr.length != 4">
<view class="acea-row">
<block v-for="(itemn, eq) in item.picturesArr" :key="eq">
<image class="image" :src="itemn" mode="aspectFill" v-if="eq < 3"/>
</block>
</view>
<view class="more" v-if="item.picturesArr.length > 3" @click="previewImage(item, eq)">查看全部 {{item.picturesArr.length}}</view>
<!-- <view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<image :src="itemn" class="image" />
</view> -->
</view>
<view class="imgList acea-row" v-else>
<block v-for="(itemn, eq) in item.picturesArr" :key="eq">
<image class="pictrue" :src="itemn" mode="aspectFill" :style="eq == item.picturesArr.length-1 || eq == item.picturesArr.length-2?'':'margin-bottom: 11rpx;'" @click="previewImage(item, eq)"/>
</block>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
<!-- <view class="generalComment acea-row row-between-wrapper">
<view class="acea-row row-middle font-color-red">
<text class="evaluate">评分</text>
<view class="start" :class="'star' + replyData.replyStar"></view>
@ -10,26 +74,10 @@
<text class="font-color-red">{{ replyData.replyChance || 0 }}%</text>
<text>好评率</text>
</view>
</view>
<view class="nav acea-row row-middle">
<view
class="acea-row row-center-wrapper"
v-for="(item, navListIndex) in navList"
:key="navListIndex"
@click="changeType(navListIndex)"
>
<view
class="item"
:class="currentActive === navListIndex ? 'bg-color-red' : ''"
v-if="item.num"
>
<text>{{ item.evaluate }}({{ item.num }})</text>
</view>
</view>
</view>
</view>
<UserEvaluation :reply="reply"></UserEvaluation>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view> -->
<!-- <UserEvaluation :reply="reply"></UserEvaluation> -->
</view>
</template>
<script>
@ -46,6 +94,7 @@ export default {
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
product_id: 0,
replyData: {},
navList: [
@ -74,7 +123,7 @@ export default {
methods: {
getProductReplyCount () {
getReplyConfig(this.product_id).then(res => {
this.$set(that, "replyData", res.data);
this.$set(this, "replyData", res.data);
this.navList[0].num = res.data.sumCount;
this.navList[1].num = res.data.goodCount;
this.navList[2].num = res.data.inCount;
@ -90,6 +139,9 @@ export default {
this.loading = false;
//apply();js;
this.reply.push.apply(this.reply, res.data);
this.reply.forEach( val => {
val.star = val.star*1;
})
this.loadend = res.data.length < this.limit; //
this.page = this.page + 1;
});
@ -100,11 +152,152 @@ export default {
this.loadend = false;
this.$set(this, "reply", []);
this.getProductReplyList();
}
},
previewImage(item, current) {
uni.previewImage({
current,
urls: item.picturesArr,
});
},
}
};
</script>
<style scoped lang="less">
.header {
width: 100vw;
position: fixed;
z-index: 100;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.list {
margin: 0rpx 32rpx 32rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 24rpx;
.item {
margin-bottom: 46rpx;
.pic-text {
padding-bottom: 16rpx;
.image {
width: 66rpx;
height: 66rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.noAvatar {
width: 66rpx;
height: 66rpx;
border-radius: 50%;
margin-right: 20rpx;
background-color: #FFFFFF;
padding-left: 3rpx;
padding-right: 2rpx;
image {
width: 100%;
}
}
.name {
max-width: 260rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 34rpx;
padding-right: 6rpx;
}
.vip {
width: 80rpx;
height: 26rpx;
background-color: #2DB5AE;
}
.starBox {
padding-top: 4rpx;
image {
width: 26rpx;
height: 26rpx;
}
}
.time {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: #3A3A3C;
line-height: 26rpx;
}
}
}
.item:last-child {
margin-bottom: 12rpx;
}
}
.evaluate-infor {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
}
.imgList {
padding-top: 12rpx;
position: relative;
image {
background: #D8D8D8;
}
.image {
width: 204rpx;
height: 204rpx;
border-radius: 8rpx;
margin-right: 13rpx;
}
.image:last-child {
margin-right: 0rpx;
}
.more {
width: 204rpx;
height: 204rpx;
border-radius: 8rpx;
background: rgba(45, 181, 174, 0.4);
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 204rpx;
text-align: center;
position: absolute;
top: 12rpx;
right: 0;
z-index: 4;
}
.pictrue {
width: 314rpx;
height: 308rpx;
border-radius: 8rpx;
margin-right: 11rpx;
}
.pictrue:nth-child(2n) {
margin-right: 0;
}
}
.noCommodity {
height: 8*100rpx;
background-color: #fff;

522
pages/shop/Evaluations/EvaluationDetail/index.vue

@ -0,0 +1,522 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true" :hasShadow="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">甄选测评</view>
</block>
</cu-custom>
</view>
<view class="synopsis-box acea-row" v-if="info.synopsis">
<view class="left-circle"></view>
<view class="info">
<!-- <text>甄选评测介绍</text> -->{{' ' + info.synopsis}}
</view>
<image src="../../../../static/images/evaluation-icon.png" mode=""></image>
</view>
<view class="video-box" v-if="info.videoInput">
<video
id="myVideo"
:src="info.videoInput"
@error="videoErrorCallback"
:show-center-play-btn="true"
:show-play-btn="true"
:show-mute-btn="true"
controls
></video>
<!-- picture-in-picture-mode="{{['push', 'pop']}}"
bindenterpictureinpicture='bindVideoEnterPictureInPicture'
bindleavepictureinpicture='bindVideoLeavePictureInPicture' -->
</view>
<view class="productInfo-box acea-row row-between" v-if="info.productInfo">
<image :src="info.productInfo.image" mode="aspectFill"></image>
<view class="right-text">
<view class="name line1">{{info.productInfo.storeName}}</view>
<view class="info line1">{{info.productInfo.storeInfo}}</view>
<view class="acea-row row-between">
<view class="price-box">
<view class="price">¥{{info.productInfo.price}}</view>
<view class="otPrice">¥{{info.productInfo.otPrice}}</view>
</view>
<view class="btn" @click="goGoodsDetail">查看详情</view>
</view>
</view>
</view>
<!-- <view class="wrapper">
<view class="item" v-if="info.summary">
<view class="title-box acea-row row-middle">
<view class="num">1</view>
<view class="">眼界甄选评测员总结</view>
</view>
<view class="info-text">{{info.summary}}</view>
</view>
<view class="item" v-if="info.feelSynopsis || info.feelImage">
<view class="title-box acea-row row-middle">
<view class="num">{{info.summary?'2':'1'}}</view>
<view class="">实用体验感受</view>
</view>
<view class="info-text" v-if="info.feelSynopsis">{{info.feelSynopsis}}</view>
<view class="images-box" v-if="info.feelImage">
<swiper @change="feelCurrentChange">
<swiper-item v-for="(item, index) in info.feelImageArr" :key="index">
<image :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="dot-box acea-row row-center">
<view :class="'dot ' + (feelCurrent == index?'on':'')" v-for="(item,index) in info.feelImageArr" :key="index"></view>
</view>
</view>
</view>
<view class="item" v-if="info.accessibilitySynopsis || info.accessibilityImage">
<view class="title-box acea-row">
<view class="num">{{info.summary?(info.feelSynopsis || info.feelImage?'3':'2'):(info.feelSynopsis || info.feelImage?'2':'1')}}</view>
<view class="">易用性体验</view>
</view>
<view class="info-text" v-if="info.accessibilitySynopsis">{{info.accessibilitySynopsis}}</view>
<view class="images-box" v-if="info.accessibilityImage">
<swiper @change="accessibilityCurrentChange">
<swiper-item v-for="(item, index) in info.accessibilityImageArr" :key="index">
<image :src="item" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="dot-box acea-row row-center">
<view :class="'dot ' + (accessibilityCurrent == index?'on':'')" v-for="(item,index) in info.accessibilityImageArr" :key="index"></view>
</view>
</view>
</view>
</view> -->
<view class="wrapper-box">
<view class="item" v-for="(item,index) in editableTabs" :key="index">
<view class="title-box acea-row row-middle">
<view class="num">{{index+1}}</view>
<view class="title">{{item.content}}</view>
</view>
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="item.configuration"/>
</view>
</view>
<view :style="addBottom?'height: 162rpx;':'height: 122rpx;'"></view>
<view class="footer acea-row row-between" :style="addBottom?'height: 162rpx;':'height: 122rpx;'">
<view class="acea-row btn-box row-around">
<button class="item contacButton" open-type="share" hover-class="none">
<image src="../../../../static/images/share-icon.png" mode=""></image>
<view class="">分享</view>
</button>
<button class="item contacButton" hover-class="none" @click.stop="getCollection">
<image :src="`../../../../static/images/${isCollect?'star-light':'star'}.png`" mode=""></image>
<view class="">{{isCollect? '已收藏':'收藏'}}</view>
</button>
<!-- <view class="item" @click="share">
<image src="../../../../static/images/share-icon.png" mode=""></image>
<view class="">分享</view>
</view> -->
</view>
<view class="btn" @click="goGoodsDetail">立即购买</view>
</view>
</view>
</template>
<script>
import { getEvaluationDetail,getUserCollection,delUserCollection} from '@/api/store'
export default {
data() {
return {
isCollect:true,
productInfo:{},
addBottom: this.addBottom,
id: 0,
info: {},
feelCurrent: 0,
accessibilityCurrent: 0,
editableTabs:[],
tagStyle: {
// p: 'text-indent:2em;font-family: PingFang SC;font-size:28rpx;',
img: 'padding:0;margin:20rpx 0;font-size:0;display:block;border-radius: 16rpx;'
}
};
},
onLoad() {
this.id = this._route.query.id
this.getInfo(this.id);
},
onShareAppMessage() {
return {
title: '甄选测评',
path: '/pages/shop/Evaluations/EvaluationDetail/index?id='+this.id
}
},
//
onShareTimeline(res) {
return {
title: '甄选测评',
path: '/pages/shop/Evaluations/EvaluationDetail/index?id=' + this.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
}
},
methods: {
getCollection: function() {
let param={}
param.id=this.id
param.category= "collect"
if (this.isCollect) {
delUserCollection(param).then(res=>{
this.isCollect=!this.isCollect
})
}else{
getUserCollection(param).then(res=>{
this.isCollect=!this.isCollect
})
}
},
getInfo(id) {
uni.showLoading({
title: ''
})
getEvaluationDetail(id).then(res => {
this.info = res.data;
this.isCollect=this.info.isCollect;
this.$set(this,'editableTabs',res.data.editableTabs)
uni.hideLoading();
})
},
videoErrorCallback(e) {
console.log('视频错误信息:')
console.log(e.detail.errMsg)
},
goGoodsDetail() {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: this.info.productInfo.id,
},
})
},
feelCurrentChange(e) {
this.feelCurrent = e.detail.current;
},
accessibilityCurrentChange(e) {
this.accessibilityCurrent = e.detail.current;
},
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.synopsis-box {
margin: 20rpx 32rpx 0rpx 90rpx;
padding: 20rpx 0rpx 20rpx 50rpx;
width: 628rpx;
min-height: 146rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
position: relative;
.left-circle {
height: 98rpx;
width: 98rpx;
background: #F1F1F1;
border-radius: 50%;
position: absolute;
top: 22rpx;
left: -50rpx;
// box-shadow: 0rpx 10rpx 8rpx 0rpx rgba(0,0,0,0.15);
}
image {
width: 120rpx;
height: 120rpx;
position: absolute;
top: 24rpx;
left: -66rpx;
}
.info {
height: 100%;
overflow: hidden;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 26rpx;
padding: 0rpx 8rpx;
// text {
// font-weight: 600;
// // padding-right: 6rpx;
// }
}
}
.video-box {
margin: 20rpx 32rpx 0rpx;
width: 686rpx;
height: 384rpx;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
#myVideo {
width: 686rpx;
height: 384rpx;
border-radius: 16rpx;
}
}
.productInfo-box {
margin: 20rpx 32rpx 0rpx;
width: 686rpx;
height: 178rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 8rpx;
image {
width: 164rpx;
height: 164rpx;
border-radius: 16rpx;
}
.right-text {
width: 478rpx;
margin-right: 8rpx;
padding-top: 8rpx;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #999999;
line-height: 28rpx;
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.info {
padding-bottom: 14rpx;
}
.price-box {
font-family: Futura;
.price {
color: #3A3A3C;
line-height: 36rpx;
font-size: 30rpx;
}
.otPrice {
text-decoration: line-through;
}
}
.btn {
margin-top: 18rpx;
width: 138rpx;
height: 42rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-size: 24rpx;
font-family: PingFang SC;
color: #FFFFFF;
line-height: 42rpx;
text-align: center;
}
}
}
// .wrapper {
// margin: 20rpx 32rpx;
// padding: 16rpx 24rpx;
// width: 686rpx;
// background: #F5F6F8;
// box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0,0,0,0.15);
// border-radius: 16rpx;
// .item {
// padding-bottom: 22rpx;
// .title-box {
// font-size: 30rpx;
// font-family: SourceHanSansSCVF;
// font-weight: 600;
// color: #3A3A3C;
// line-height: 23px;
// .num {
// width: 34rpx;
// height: 34rpx;
// border-radius: 50%;
// background: #2DB5AE;
// font-size: 20rpx;
// font-family: PingFang SC;
// font-weight: 600;
// color: #FFFFFF;
// line-height: 34rpx;
// text-align: center;
// margin-right: 8rpx;
// }
// }
// .info-text {
// margin-bottom: 24rpx;
// font-size: 24rpx;
// font-family: PingFang SC;
// font-weight: 500;
// color: #3A3A3C;
// line-height: 32rpx;
// text-indent: 42rpx;
// }
// .images-box {
// padding-bottom: 24rpx;
// position: relative;
// swiper {
// width: 638rpx;
// height: 360rpx;
// border-radius: 16rpx;
// overflow: hidden;
// swiper-item {
// border-radius: 16rpx;
// image {
// width: 638rpx;
// height: 360rpx;
// border-radius: 16rpx;
// }
// }
// }
// .dot-box {
// position: absolute;
// bottom: 40rpx;
// left: 50%;
// transform: translateX(-50%);
// .dot {
// width: 8rpx;
// height: 8rpx;
// background: #FFFFFF;
// border-radius: 6rpx;
// margin: 0rpx 8rpx;
// transition: width .5s cubic-bezier(.18,.89,.17,.88);
// }
// .on {
// width: 36rpx;
// background: #2DB5AE;
// transition: width .5s cubic-bezier(.18,.89,.17,.88);
// }
// }
// }
// }
// }
.wrapper-box {
margin: 20rpx 32rpx;
padding: 16rpx 24rpx;
width: 686rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.item {
padding-bottom: 22rpx;
.title-box {
// padding: 0 30rpx;
font-size: 30rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 23px;
margin-bottom: 10rpx;
.num {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
background: #2DB5AE;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 34rpx;
text-align: center;
margin-right: 8rpx;
}
.title{
font-size: 32rpx;
font-weight: 600;
}
}
.info-text {
margin-bottom: 24rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
text-indent: 42rpx;
}
}
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
background: #F1F1F1;
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.2);
border-radius: 28rpx 28rpx 0rpx 0rpx;
padding: 12rpx 32rpx 0rpx;
.btn-box{
width: 35%;
}
.contacButton {
height: 80rpx;
padding: 0;
background-color: #F1F1F1;
width: 100rpx;
}
.contacButton::after {
border: 0;
}
.item {
text-align: center;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 22rpx;
image {
width: 50rpx;
height: 50rpx;
}
}
.btn {
margin-top: 6rpx;
width: 386rpx;
height: 66rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 66rpx;
text-align: center;
}
}
</style>

117
pages/shop/Evaluations/index.vue

@ -0,0 +1,117 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<image class="tab-title" src="../../../static/images/yanjie-logo.png" mode=""></image>
</block>
</cu-custom>
</view>
<view class="title-box">
<view class="en-title">SELECTION EVALUATION</view>
<view class="title">甄选评测</view>
</view>
<view class="list-box">
<view class="item" v-for="(item,index) in evaluations" :key="index" @click="goDetail(item)">
<image :src="item.homeImage" mode="aspectFill"></image>
</view>
</view>
</view>
</template>
<script>
import { getEvaluation } from '@/api/store'
export default {
data() {
return {
evaluations: [],
};
},
onLoad() {
this.getData();
},
methods: {
getData() {
uni.showLoading({
title: "加载中",
});
getEvaluation().then(res => {
this.evaluations = res.data;
uni.hideLoading();
})
},
goDetail(item) {
uni.navigateTo({
url: '/pages/shop/Evaluations/EvaluationDetail/index?id=' + item.id
})
// this.$yrouter.push({
// path: '/pages/shop/Evaluations/EvaluationDetail/index',
// query: {
// id: item.id
// },
// })
}
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
width: 184rpx;
height: 46rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.title-box {
padding: 22rpx 32rpx 24rpx;
font-family: PingFang SC;
font-weight: 600;
.en-title {
font-size: 20rpx;
font-family: Futura;
color: #999999;
line-height: 22rpx;
}
.title {
font-size: 50rpx;
color: #3A3A3C;
line-height: 68rpx;
}
}
.list-box {
padding: 0rpx 32rpx 20rpx;
.item {
width: 686rpx;
height: 230rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
}
}
</style>

119
pages/shop/GoodSearch/index.vue

@ -1,15 +1,27 @@
<template>
<view>
<view class="searchGood">
<view class="search acea-row row-between-wrapper">
<cu-custom :isBack="true">
<block slot="backText">
<image class="backImg" src="../../../static/images/back-btn.png" mode=""></image>
</block>
<block slot="content">
<view class="search acea-row row-between-wrapper" :style="'width:calc('+CustomBarLeft+'px - 57px);'">
<input type="text" placeholder="请输入搜索内容" placeholder-style="color: #999999;" v-model="search" confirm-type="搜索" @confirm="submit">
<!-- <image src="../../../static/images/scan.png" /> -->
<view class="btn" @click="submit">搜索</view>
</view>
</block>
</cu-custom>
<!-- <view class="search acea-row row-between-wrapper">
<view class="input acea-row row-between-wrapper">
<text class="iconfont icon-sousuo2"></text>
<!-- <form @submit.prevent="submit"></form> -->
<form @submit.prevent="submit"></form>
<input type="text" placeholder="点击搜索商品" v-model="search" />
</view>
<view class="bnt" @click="submit">搜索</view>
</view>
<view v-if="keywords.length">
</view> -->
<!-- <view v-if="keywords.length">
<view class="title">热门搜索</view>
<view class="list acea-row">
<view
@ -19,10 +31,24 @@
@click="toSearch(keywordsKey)"
>{{ keywordsKey }}</view>
</view>
</view>
<view class="line"></view>
</view> -->
<!-- <view class="line"></view> -->
<!-- <GoodList></GoodList>-->
</view>
<view class="searchGood-content" :style="'height:calc(100vh - '+CustomBar+'px);'">
<view class="searchGood-keywords">
<view class="title">热门搜索</view>
<view class="list acea-row">
<view
class="item"
v-for="keywordsKey of keywords"
:key="keywordsKey"
@click="toSearch(keywordsKey)"
>{{ keywordsKey }}</view>
</view>
</view>
</view>
<!--<view class="noCommodity">-->
<!--<view class="noPictrue">-->
<!--<image :src="`${$VUE_APP_RESOURCES_URL}/images/noSearch.png`" class="image" />-->
@ -45,6 +71,9 @@ export default {
props: {},
data: function() {
return {
StatusBar: this.StatusBar,
CustomBar: this.CustomBar,
CustomBarLeft: this.CustomBarLeft,
keywords: [],
search: ""
};
@ -54,8 +83,11 @@ export default {
},
methods: {
submit() {
const search = trim(this.search) || "";
let search = trim(this.search) || "";
if (!search) return;
// if (!search) {
// search = '';
// };
this.toSearch(search);
},
toSearch(s) {
@ -69,9 +101,76 @@ export default {
}
};
</script>
<style >
<style lang="less" scoped>
// .noCommodity {
// border-top: 0.05*100rpx solid #f5f5f5;
// }
.noCommodity {
border-top: 0.05*100rpx solid #f5f5f5;
.searchGood {
.backImg {
height: 62rpx;
width: 62rpx;
margin-left: 26rpx;
}
.search {
input {
width: 280rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
// line-height: 38rpx;
}
image {
width: 48rpx;
height: 48rpx;
}
.btn {
width: 96rpx;
height: 50rpx;
background: linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
border-radius: 10rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 50rpx;
text-align: center;
}
}
}
.searchGood-content {
width: 100vw;
padding-top: 4rpx;
.searchGood-keywords {
width: 100%;
height: 100%;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
padding: 20rpx 32rpx;
.title {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 42rpx;
padding: 16rpx 0rpx;
}
.item {
padding: 0rpx 16rpx;
height: 56rpx;
background: #F1F1F1;
border-radius: 16rpx;
margin-right: 20rpx;
margin-bottom: 16rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 56rpx;
}
}
}
</style>

407
pages/shop/GoodsClass/index.vue

@ -1,13 +1,55 @@
<template>
<view class="productSort">
<div class="index">
<view class="header acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>搜索商品
</view>
</view>
</div>
<view class="aside">
<view class="header acea-row row-center-wrapper">
<cu-custom :isBack="true">
<block slot="content">
<view @click="goGoodSearch()" class="search acea-row row-between-wrapper" :style="'width:calc('+CustomBarLeft+'px - 54rpx);'">
<text class="iconfont icon-xiazai5"></text>
<!-- <image src="../../../static/images/scan.png" /> -->
</view>
</block>
</cu-custom>
</view>
<view :style="[{height:CustomBar + 'px'}]"></view>
<view class="category-box">
<swiper class="category" @change="swiperChange" :style="categoryList[0].length <= 5?'height: 190rpx;':''">
<swiper-item v-for="(category, index) in categoryList" :key="index" class="category-item ">
<view class="acea-row">
<view class="min-item" v-for="item in category" :key="item.id" @click="goGoodsList(item)">
<view class="img-box">
<image class="img" :src="item.pic" mode="aspectFill"></image>
</view>
<view class="title">{{item.cateName}}</view>
</view>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots acea-row row-center">
<view :class="'dot ' + (swiperCurrent === index ? 'dot-active' : '')" v-for="(dot, index) in categoryList.length" :key="index"></view>
</view>
</view>
<view class="list-box" :style="categoryList[0].length <= 5?addBottom?heightList[0]:heightList[1]:addBottom?heightList[2]:heightList[3]">
<view class="nav-box acea-row row-around">
<view class="item" @click="changeNav(0)">
<view :class="'title ' + (stock === 0 && price === 0? 'active' : '')">综合</view>
</view>
<view class="item" @click="changeNav(2)">
<view :class="'title ' + (stock === 2 ? 'active' : '')">销量</view>
</view>
<view class="item" @click="changeNav(1)">
<view :class="'title acea-row row-middle ' + (stock === 0 && price ? 'active' : '')">
<view class="">价格</view>
<view :class="'jiantou ' + (price?price === 1?'up':'down':'')"></view>
</view>
</view>
</view>
<PromotionGood :benefit="goodsList" />
</view>
<!-- <view class="aside">
<view
class="item acea-row row-center-wrapper"
:class="categoryDivindex === navActive ? 'on' : ''"
@ -42,85 +84,338 @@
</view>
</view>
</view>
<view style="height:100rpx;"></view>
<view style="height:100rpx;"></view> -->
<Tabbar :pagePath="pagePath"></Tabbar>
</view>
</template>
<script>
import { getCategory } from "@/api/store";
import { trim } from "@/utils";
import {
getCategory,
getProducts,
} from "@/api/store";
// import { trim } from "@/utils";
import Tabbar from '@/components/Tabbar';
import PromotionGood from '@/components/PromotionGood'
export default {
name: "GoodsClass",
components: {},
components: {
Tabbar,
PromotionGood
},
props: {},
data: function() {
return {
category: [],
navActive: 0,
search: "",
lock: false
};
CustomBar: this.CustomBar,
CustomBarLeft: this.CustomBarLeft,
addBottom: this.addBottom,
pagePath: '',
swiperCurrent: 0,
categoryList: [],
// category: [],
heightList: [
'min-height: calc(100vh - 492rpx);',
'min-height: calc(100vh - 452rpx);',
'min-height: calc(100vh - 682rpx);',
'min-height: calc(100vh - 642rpx);'
],
price: 0,
stock: 0,
where: {
page: 1,
limit: 10,
keyword: '',
// sid: 0,
news: 0,
priceOrder: '',
salesOrder: '',
isIntegral: 0
},
goodsList: [],
loaded: false,
// search: "",
// lock: false,
};
},
watch: {
"$yroute.query.id": function(n) {
if (n) {
this.activeCateId(n);
}
}
// "$yroute.query.id": function(n) {
// if (n) {
// this.activeCateId(n);
// }
// }
},
onLoad() {
uni.hideTabBar();
let pages = getCurrentPages();
this.pagePath = '/' + pages[pages.length - 1].route;
},
onShow() {
},
mounted: function() {
this.loadCategoryData();
},
onReachBottom() {
if(this.loaded) return
this.getGoodsList();
},
methods: {
goGoodSearch() {
this.$yrouter.push("/pages/shop/GoodSearch/index");
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
goGoodsList(child) {
this.$yrouter.push({
path: "/pages/shop/GoodsList/index",
query: { id: child.id, title: child.cateName }
});
},
activeCateId(n) {
let index = 0;
n = parseInt(n);
if (!n) return;
this.category.forEach((cate, i) => {
if (cate.id === n) index = i;
});
if (index !== this.navActive) {
this.asideTap(index);
}
},
// activeCateId(n) {
// let index = 0;
// n = parseInt(n);
// if (!n) return;
// this.category.forEach((cate, i) => {
// if (cate.id === n) index = i;
// });
// if (index !== this.navActive) {
// this.asideTap(index);
// }
// },
loadCategoryData() {
getCategory().then(res => {
this.category = res.data;
this.$nextTick(() => {
if (this.$yroute.query.id) {
this.activeCateId(this.$yroute.query.id);
}
});
// this.category = res.data;
let arr = [],
minArr = [];
res.data.forEach(val => {
if (minArr.length === 10) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(val);
})
this.categoryList = arr;
// this.$nextTick(() => {
// if (this.$yroute.query.id) {
// this.activeCateId(this.$yroute.query.id);
// }
// });
});
this.getGoodsList();
},
submitForm: function() {
var val = trim(this.search);
if (val) {
this.$yrouter.push({
path: "/pages/shop/GoodsList/index",
query: { s: val }
});
setTimeout(() => (this.search = ""), 500);
}
},
asideTap(index) {
this.navActive = index;
}
changeNav(i) {
switch (i) {
case 0:
if(this.stock !== 0 || this.price !== 0) {
this.price = 0;
this.stock = 0;
}
break
case 1:
if (this.price === 0) this.price = 1
else if (this.price === 1) this.price = 2
else if (this.price === 2) this.price = 1
this.stock = 0
break
case 2:
if (this.stock === 0) this.stock = 2
this.price = 0
break
default:
break
}
this.goodsList = [];
this.where.page = 1;
this.loaded = false;
this.getGoodsList();
},
getGoodsList() {
this.setWhere();
getProducts(this.where).then(res => {
this.goodsList.push.apply(this.goodsList, res.data);
this.loaded = res.data.length < this.where.limit;
this.where.page++;
})
},
//where
setWhere() {
if (this.price === 0) {
this.where.priceOrder = ''
} else if (this.price === 1) {
this.where.priceOrder = 'asc'
} else if (this.price === 2) {
this.where.priceOrder = 'desc'
}
if (this.stock === 0) {
this.where.salesOrder = ''
} else if (this.stock === 1) {
this.where.salesOrder = 'asc'
} else if (this.stock === 2) {
this.where.salesOrder = 'desc'
}
},
// submitForm: function() {
// var val = trim(this.search);
// if (val) {
// this.$yrouter.push({
// path: "/pages/shop/GoodsList/index",
// query: { s: val }
// });
// setTimeout(() => (this.search = ""), 500);
// }
// },
// asideTap(index) {
// this.navActive = index;
// }
}
}
</script>
<style >
.productSort {
<style lang="less" scoped>
/* .productSort {
height: 100%;
}
} */
.header {
padding-bottom: 12rpx;
position: fixed;
left: 0;
top: 0;
z-index: 100;
background: #F1F1F1;
width: 750rpx;
.search {
height: 62rpx;
background: #E3E3E3;
border-radius: 16rpx;
padding: 0rpx 16rpx;
margin-left: 26rpx;
margin-right: 22rpx;
.iconfont {
font-size: 30rpx;
color: #3A3A3C;
font-weight: 600;
}
image {
width: 48rpx;
height: 48rpx;
}
}
}
.category-box {
padding: 20rpx 20rpx 32rpx;
swiper {
width: 710rpx;
height: 380rpx;
swiper-item {
padding: 0rpx 12rpx;
.min-item {
margin-bottom: 20rpx;
margin-right: 18rpx;
.img-box {
background: #FFFFFF;
width: 124rpx;
height: 124rpx;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.img {
width: 124rpx;
height: 124rpx;
border-radius: 16rpx;
}
}
.title {
padding-top: 16rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 30rpx;
text-align: center;
}
}
.min-item:nth-child(5n) {
margin-right: 0rpx;
}
}
}
.swiper-dots {
.dot {
width: 92rpx;
height: 6rpx;
background: #2DB5AE;
margin: 0rpx 4rpx;
opacity: 0.24;
}
.dot-active {
opacity: 1;
transition: opacity 2s cubic-bezier(.18,.89,.17,.88);
}
}
}
.list-box {
width: 100vw;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
height: 104rpx;
padding: 32rpx 32rpx 26rpx;
.item {
min-width: 66rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: SourceHanSansSCVF;
font-weight: 400;
color: #999999;
line-height: 38rpx;
.jiantou {
width: 0rpx;
height: 0rpx;
border-top: 0rpx solid transparent;
border-left: 6rpx solid transparent;
border-bottom: 10rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 4rpx;
}
.up {
border-top: 0rpx solid transparent;
border-bottom: 10rpx solid #999999;
}
.down {
border-top: 10rpx solid #999999;
border-bottom: 0rpx solid transparent;
}
}
.active {
color: #3A3A3C;
font-weight: 500;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
</style>

580
pages/shop/GoodsCollection/index.vue

@ -1,101 +1,495 @@
<template>
<view ref="container">
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item acea-row row-between-wrapper" v-for="(item, collectProductListIndex) in collectProductList" :key="collectProductListIndex" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text acea-row row-column-between">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row row-between-wrapper">
<view class="money font-color-red" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money font-color-red" v-else>{{ item.price }}</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)">删除</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<view class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1">
<view ref="container">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的收藏</view>
</block>
</cu-custom>
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:'+CustomBar+'px;'">
<view class="nav acea-row row-around">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">甄选商品</view>
</view>
<view class="item" @click="changeType(1)">
<view :class="'title ' + (navType === 1 ? 'active' : '')">甄选评测</view>
</view>
</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">
{{ item.productInfo.attrInfo.sku }}</view>
</view>
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
</view>
<!-- 评测 -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<image class="img" :src="item.homeImage" mode="aspectFill"></image>
<!-- <view class="more">MORE</view> -->
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)"
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
<!--暂无收藏-->
<view v-else class="noCommodity" style="padding-top:208rpx;">
<view class="noPictrue">
<image src="@/static/images/no-more.png" class="image" />
</view>
<view class="text-big">
什么都没有大概被外星人带走了
</view>
<!-- <view class="text-small">
快去领取福利优惠券吧
</view> -->
</view>
</view>
<!-- <view class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCollection.png`" class="image" />
</view>
<Recommend></Recommend>
</view>
</view>
</view> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
import { getCollectUser, getCollectDel } from '@/api/user'
import Loading from '@/components/Loading'
export default {
name: 'GoodsCollection',
components: {
Recommend,
Loading,
},
props: {},
data: function() {
return {
page: 1,
limit: 20,
type: 'collect',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
}
},
mounted: function() {
this.get_user_collect_product()
},
onReachBottom() {
!this.loading && this.get_user_collect_product()
},
methods: {
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
}
},
get_user_collect_product: function() {
let that = this
if (that.loading) return //false
if (that.loadend) return //false
that.loading = true
getCollectUser(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
that.collectProductList.push.apply(that.collectProductList, res.data)
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
},
//
delCollection: function(index) {
let that = this,
id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
},
},
}
import Recommend from '@/components/Recommend'
import {
getCollectUser,
getCollectDel,
getCollectEvaluation
} from '@/api/user'
import {
delUserCollection
} from '@/api/store.js'
import Loading from '@/components/Loading'
export default {
name: 'GoodsCollection',
components: {
Recommend,
Loading,
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
navType: 0,
page: 1,
limit: 20,
type: 'collect',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
delBtnWidth: 154,
startX: 0
}
},
mounted: function() {
this.get_user_collect_product(this.navType)
},
onReachBottom() {
!this.loading && this.get_user_collect_product(this.navType)
},
methods: {
changeType(i) {
if (this.navType == i) return;
this.navType = i;
this.collectProductList = []
this.page = 1
this.limit = 20
this.get_user_collect_product(this.navType)
},
drawStart(e) {
var touch = e.touches[0];
// let index = e.currentTarget.dataset.index;
for (var index in this.collectProductList) {
this.collectProductList[index].right = 0;
}
this.startX = touch.clientX;
// console.log(this.startX, "drawStart", index)
},
drawMove(e) {
let touch = e.touches[0];
// console.log(touch, "drawMove")
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
let disX = this.startX - touch.clientX;
// console.log(index, "drawMove")
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.collectProductList[index].right = disX;
} else {
this.collectProductList[index].right = 0;
}
},
drawEnd(e) {
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
console.log(item.right, "drawEnd", index);
if (item.right >= 80) {
this.collectProductList[index].right = this.delBtnWidth;
} else {
this.collectProductList[index].right = 0;
}
console.log(this.collectProductList, "drawEnd", index);
},
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.pid
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.pid
},
})
}
},
goEvaluation(item) {
this.$yrouter.push({
//
path: '/pages/shop/Evaluations/EvaluationDetail/index',
query: {
id: item.evaluationId
},
})
},
get_user_collect_product: function(navType) {
let that = this
if (that.loading) return //false
// if (that.loadend) return //false
that.loading = true
if (navType === 1) {
// collectEvaluation/user
getCollectEvaluation(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
var arr = [];
for (var i in res.data) {
res.data[i].right = 0;
arr.push(res.data[i])
};
that.collectProductList.push.apply(that.collectProductList, arr)
// this.collectProductList.forEach(val => {
// val.right = 0;
// })
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
} else {
getCollectUser(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
var arr = [];
for (var i in res.data) {
res.data[i].right = 0;
arr.push(res.data[i])
};
that.collectProductList.push.apply(that.collectProductList, arr)
// this.collectProductList.forEach(val => {
// val.right = 0;
// })
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
}
},
//
delCollection: function(index) {
let that = this
if (that.navType === 0) {
let id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
} else {
//
let param={}
param.id=that.collectProductList[index].evaluationId,
param.category= "collect"
delUserCollection(param).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
}
},
},
}
</script>
<style lang="less" scoped>
.review-box {
border-radius: 16rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
position: relative;
.img {
width: 687rpx;
height: 240rpx;
border-radius: 16rpx;
}
.more {
font-size: 24rpx;
position: absolute;
left: 30rpx;
bottom: 30rpx;
}
.more::before {
position: absolute;
border-bottom: 1rpx solid black;
bottom: -8rpx;
left: -4rpx;
content: '';
width: 100rpx;
background-color: black;
height: 1rpx;
}
.more::after {
margin-left: 10rpx;
content: '';
display: inline-block;
width: 0;
height: 0;
border-top: 10rpx solid transparent;
border-left: 10rpx solid black;
border-bottom: 10rpx solid transparent;
border-right: 10rpx solid transparent;
}
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
// .content-box {
// padding-top: 4rpx;
// width: 100vw;
// position: relative;
.content {
width: 100%;
height: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.nav {
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
width: 112rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform: scaleX(0);
transition: all .2s cubic-bezier(.18, .89, .17, .88), opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
// }
.info-box {
width: 686rpx;
height: 202rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 20rpx;
.sku-box {
margin: 18rpx 0rpx;
height: 46rpx;
}
.sku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 46rpx;
}
}
.collectionGoods {
padding-top: 114rpx;
}
.collectionGoods .item .delete {
position: absolute;
top: 0;
right: -186rpx;
width: 154rpx;
height: 202rpx;
background: #EC3A5B;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 202rpx;
text-align: center;
text-shadow: 0rpx 10rpx 16rpx rgba(0, 0, 0, 0.15);
}
.del-height {
height: 240rpx !important;
line-height: 240rpx !important;
}
.noCommodity{
.noPictrue{
width: 428rpx;
height: 526rpx;
}
.text-big{
padding: 0 30rpx;
text-align: center;
font-family: PingFangSC-Medium, PingFang SC;
font-style: 36rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.text-small{
padding: 0 80rpx;
font-family: PingFangSC-Medium, PingFang SC;
text-align: center;
font-style: 28rpx;
font-weight: 400;
color: #3A3A3C;
line-height: 40rpx;
}
}
</style>

2324
pages/shop/GoodsCon/index.vue

File diff suppressed because it is too large Load Diff

244
pages/shop/GoodsEvaluate/index.vue

@ -1,6 +1,78 @@
<template>
<view class="evaluate-con">
<view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">商品评价</view>
</block>
</cu-custom>
</view>
<view class="content-box">
<view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<view class="pictrue">
<image :src="orderCon.productInfo.attrInfo.image || orderCon.productInfo.image" class="image" />
</view>
<view class="text">
<view class="name line1">{{ orderCon.productInfo.storeName }}</view>
<view class="sku-box acea-row">
<view class="sku">{{orderCon.productInfo.attrInfo.sku}}</view>
</view>
<view class="money acea-row row-between-wrapper">
<view>{{ orderCon.productInfo.price }}</view>
<view class="num">x{{ orderCon.cartNum }}</view>
</view>
</view>
</view>
<view class="score-box">
<view class="score-item acea-row row-middle" v-for="(item, scoreListIndexw) in scoreList" :key="scoreListIndexw" >
<view>{{ item.name }}</view>
<view class="starsList acea-row">
<view class="item" @click="stars(starsIndexn, scoreListIndexw)" v-for="(itemn, starsIndexn) in item.stars" :key="starsIndexn">
<image v-if="item.index >= starsIndexn" src="../../../static/images/star-light.png" mode=""></image>
<image v-else src="../../../static/images/star-border-light.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="textarea-box acea-row">
<image src="@/static/images/write-icon.png" mode=""></image>
<textarea class="textarea"
placeholder="为其他小伙伴提供更有帮助性的评价吧!"
placeholder-style="font-size:24rpx;color: #999999;line-height:32rpx;font-weight:400;"
v-model="expect"
></textarea>
</view>
<view class="pictrue-list" :style="uploadPictures.length>0?'':'padding-bottom: 20rpx;'">
<view class="acea-row row-middle" v-if="uploadPictures.length > 0">
<view class="pictrue" v-for="(item, uploadPicturesIndex) in uploadPictures" :key="uploadPicturesIndex" >
<image class="image" :src="item" mode="aspectFill"/>
<image class="close" src="../../../static/images/close.png" mode="" @click="uploadPictures.splice(uploadPicturesIndex, 1)"></image>
</view>
<view class="pictrue uploadBnt acea-row row-center-wrapper row-column" @tap="chooseImage">
<image class="camera" src="../../../static/images/camera.png" mode=""></image>
<view>添加图片</view>
</view>
</view>
<view class="no-picture acea-row row-column row-center-wrapper" v-else @tap="chooseImage">
<image class="camera" src="../../../static/images/camera.png" mode=""></image>
<view>添加图片</view>
</view>
</view>
</view>
<view class="evaluateBnt" @click="submit">提交</view>
<!-- <view class="goodsStyle acea-row row-between" v-if="orderCon.productInfo">
<view class="pictrue">
<image :src="orderCon.productInfo.image" class="image" />
</view>
@ -11,8 +83,8 @@
<view class="num">x{{ orderCon.cartNum }}</view>
</view>
</view>
</view>
<view class="score">
</view> -->
<!-- <view class="score">
<view
class="item acea-row row-middle"
v-for="(item, scoreListIndexw) in scoreList"
@ -51,14 +123,9 @@
</view>
</view>
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
</view>
</view> -->
</view>
</template>
<style scoped lang="less">
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
border: 1px solid #ddd;
}
</style>
<script>
import { postOrderProduct, postOrderComment } from "@/api/store";
import { trim, chooseImage } from "@/utils";
@ -82,13 +149,18 @@ export default {
}
},
scoreList: [
// {
// name: "",
// stars: ["", "", "", "", ""],
// index: -1
// },
{
name: "商品质量",
name: "商品评分",
stars: ["", "", "", "", ""],
index: -1
},
{
name: "服务态度",
name: "服务评分",
stars: ["", "", "", "", ""],
index: -1
}
@ -139,12 +211,12 @@ export default {
try {
await this.$validator({
product_score: [
required("请选择商品质量分数", {
required("请给商品评分", {
type: "number"
})
],
service_score: [
required("请选择服务态度分数", {
required("请给服务评分", {
type: "number"
})
]
@ -197,3 +269,149 @@ export default {
}
};
</script>
<style scoped lang="less">
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
margin: 0rpx 32rpx 46rpx;
padding: 20rpx 20rpx 0rpx;
width: 686rpx;
// height: 340px;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.sku-box {
padding: 18rpx 0rpx;
.sku {
padding: 0rpx 16rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
line-height: 46rpx;
}
}
}
.score-box {
.score-item {
padding-bottom: 20rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 34rpx;
.starsList {
padding-left: 20rpx;
.item {
width: 48rpx;
height: 48rpx;
margin-right: 24rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
.textarea-box {
width: 646rpx;
height: 170rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
position: relative;
padding: 16rpx;
margin-bottom: 20rpx;
image {
width: 32rpx;
height: 32rpx;
}
.textarea {
width: 582rpx;
height: 100%;
font-size: 24rpx;
color: #3A3A3C;
font-weight: 500;
line-height: 32rpx;
}
}
.pictrue-list {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 26rpx;
.pictrue {
width: 204rpx;
height: 204rpx;
background: #F1F1F1;
border-radius: 16rpx;
margin-right: 17rpx;
margin-bottom: 20rpx;
position: relative;
.image {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
.close {
width: 30rpx;
height: 30rpx;
position: absolute;
top: 10rpx;
right: 10rpx;
}
}
.pictrue:nth-child(3n) {
margin-right: 0rpx;
}
.no-picture {
width: 646rpx;
height: 204rpx;
background: #F1F1F1;
border-radius: 16rpx;
}
.camera {
width: 104rpx;
height: 104rpx;
}
}
.evaluateBnt {
margin: 0rpx 32rpx;
width: 686rpx;
height: 70rpx;
background: #2DB5AE;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F5F6F8;
line-height: 70rpx;
text-align: center;
}
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
border: 1px solid #ddd;
}
</style>

318
pages/shop/GoodsFoot/index.vue

@ -1,5 +1,5 @@
<template>
<view ref="container">
<!-- <view ref="container">
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item acea-row row-between-wrapper" v-for="(item, collectProductListIndex) in collectProductList" :key="collectProductListIndex" @click="goGoodsCon(item)">
<view class="pictrue">
@ -22,80 +22,248 @@
</view>
<Recommend></Recommend>
</view>
</view>
</view> -->
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的足迹</view>
</block>
</cu-custom>
</view>
<view class="content-box">
<view class="item-box" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view class="acea-row" @click="goGoodsCon(item)">
<image class="img" :src="item.image" mode=""></image>
<view class="right-box acea-row row-column-between row-top">
<view class="title-top line2">{{ item.storeName }}</view>
<view class="pic" v-if="item.isIntegral == 1">{{ item.integral }}积分</view>
<view class="pic" v-else>{{ item.price }}</view>
</view>
</view>
<view class="delete" :style="item.right?'right: -122rpx;':''" @click="delCollection(collectProductListIndex)">删除</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<view class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCollection.png`" class="image" />
</view>
</view>
</view>
<!-- <Recommend></Recommend> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
import { getCollectUser, getCollectDel } from '@/api/user'
import Loading from '@/components/Loading'
export default {
name: 'GoodsFoot',
components: {
Recommend,
Loading,
},
props: {},
data: function() {
return {
page: 1,
limit: 20,
type: 'foot',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
}
},
mounted: function() {
this.get_user_collect_product()
},
onReachBottom() {
!this.loading && this.get_user_collect_product()
},
methods: {
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: { id: item.pid },
})
}
},
get_user_collect_product: function() {
let that = this
if (that.loading) return //false
if (that.loadend) return //false
that.loading = true
getCollectUser(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
that.collectProductList.push.apply(that.collectProductList, res.data)
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
},
//
delCollection: function(index) {
let that = this,
id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
},
},
}
import Loading from '@/components/Loading'
// import Recommend from '@/components/Recommend'
import {
getCollectUser,
getCollectDel
} from '@/api/user'
export default {
name: 'GoodsFoot',
components: {
// Recommend,
Loading,
},
props: {},
data: function() {
return {
page: 1,
limit: 20,
type: 'foot',
collectProductList: [],
loadTitle: '',
loading: false,
loadend: false,
startX: 0,
delBtnWidth: 154
}
},
mounted: function() {
this.get_user_collect_product()
},
onReachBottom() {
!this.loading && this.get_user_collect_product()
},
methods: {
goGoodsCon(item) {
if (item.isIntegral == 1) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.pid
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.pid
},
})
}
},
get_user_collect_product: function() {
let that = this
if (that.loading) return //false
if (that.loadend) return //false
that.loading = true
getCollectUser(that.page, that.limit, that.type).then(res => {
that.loading = false
//apply();js;
res.data.forEach(val => {
val.right = 0;
})
that.collectProductList.push.apply(that.collectProductList, res.data)
that.loadend = res.data.length < that.limit //
that.page = that.page + 1
})
},
//
delCollection: function(index) {
let that = this,
id = that.collectProductList[index].pid,
category = that.collectProductList[index].category
getCollectDel(id, category).then(function() {
uni.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
complete: () => {
that.collectProductList.splice(index, 1)
that.$set(that, 'collectProductList', that.collectProductList)
},
})
})
},
drawStart(e) {
var touch = e.touches[0];
// let index = e.currentTarget.dataset.index;
for (var index in this.collectProductList) {
this.collectProductList[index].right = 0;
}
this.startX = touch.clientX;
// console.log(this.startX, "drawStart", index)
},
drawMove(e) {
let touch = e.touches[0];
// console.log(touch, "drawMove")
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
let disX = this.startX - touch.clientX;
// console.log(index, "drawMove")
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.collectProductList[index].right = disX;
} else {
this.collectProductList[index].right = 0;
}
},
drawEnd(e) {
let index = e.currentTarget.dataset.index;
let item = this.collectProductList[index];
if (item.right >= 80) {
this.collectProductList[index].right = this.delBtnWidth;
} else {
this.collectProductList[index].right = 0;
}
},
},
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content-box {
position: relative;
width: 100%;
padding: 50rpx 30rpx 30rpx;
overflow: hidden;
background-color: #fff;
height: 100%;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item-box {
position: relative;
width: 686rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 20rpx;
.img {
width: 170rpx;
height: 170rpx;
margin-right: 20rpx;
border-radius: 16rpx;
}
.right-box {
width: 450rpx;
.title-top {
color: #3A3A3C;
font-size: 28rpx;
}
.pic {
color: #2DB5AE;
font-size: 32rpx;
font-weight: 700;
}
}
//
.delete {
position: absolute;
top: 0;
right: -250rpx;
width: 154rpx;
height: 210rpx;
background: #EC3A5B;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 202rpx;
text-align: center;
text-shadow: 0rpx 10rpx 16rpx rgba(0, 0, 0, 0.06);
}
}
}
</style>

269
pages/shop/GoodsList/index.vue

@ -1,6 +1,55 @@
<template>
<view class="productList" ref="container">
<form @submit.prevent="submitForm">
<view class="header">
<cu-custom :isBack="true">
<block slot="backText">
<image class="backImg" src="../../../static/images/back-btn.png" mode=""></image>
</block>
<block slot="content">
<view class="search acea-row row-between-wrapper" :style="'width:calc('+CustomBarLeft+'px - 57px);'">
<!-- <input v-if="where.keyword" type="text" v-model="where.keyword" :disabled="true"> -->
<input type="text" v-model="where.keyword" placeholder="请输入搜索内容" confirm-type="搜索" @confirm="submit">
<!-- <input v-else type="text" v-model="title" :disabled="true"> -->
<view class="iconfont icon-guanbi" @click="close"></view>
<!-- <view class="iconfont icon-guanbi" @click="submit"></view> -->
</view>
</block>
</cu-custom>
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="no-product" v-if="productList.length === 0 && where.page > 1">
<image class="image" src="@/static/images/no-product.png" mode="widthFix"></image>
<view class="">什么也没找到</view>
<view class="tip">请试一下其他关键词</view>
</view>
<view class="nav-box" :style="'top:'+ CustomBar +'px;'">
<view class="nav acea-row row-around" v-if="productList.length > 0">
<view class="item" @click="set_where(0)">
<view :class="'title ' + (stock === 0 && price === 0? 'active' : '')">综合</view>
</view>
<view class="item" @click="set_where(2)">
<view :class="'title ' + (stock === 2 ? 'active' : '')">销量</view>
</view>
<view class="item" @click="set_where(1)">
<view :class="'title acea-row row-middle ' + (stock === 0 && price ? 'active' : '')">
<view class="">价格</view>
<view :class="'jiantou ' + (price?price === 1?'up':'down':'')"></view>
</view>
</view>
</view>
</view>
<view class="list-box" v-if="productList.length > 0">
<PromotionGood :benefit="productList" />
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
</view>
<!-- <form @submit.prevent="submitForm">
<view class="search bg-color-red acea-row row-between-wrapper">
<view class="input acea-row row-between-wrapper">
<input placeholder="搜索商品信息" v-model="where.keyword" />
@ -8,8 +57,8 @@
</view>
<view class="iconfont" :class="Switch === true ? 'icon-pailie' : 'icon-tupianpailie'" @click="switchTap"></view>
</view>
</form>
<view class="nav acea-row row-middle">
</form> -->
<!-- <view class="nav acea-row row-middle">
<view class="item" :class="title ? 'font-color-red' : ''" @click="set_where(0)">{{ title ? title : '默认' }}</view>
<view class="item" @click="set_where(1)">
价格
@ -23,10 +72,11 @@
<image :src="`${$VUE_APP_RESOURCES_URL}/images/up.png`" v-if="stock === 1" />
<image :src="`${$VUE_APP_RESOURCES_URL}/images/down.png`" v-if="stock === 2" />
</view>
<!-- down -->
down
<view class="item" :class="nows ? 'font-color-red' : ''" @click="set_where(3)">新品</view>
</view>
<view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container" v-if="!isIntegral">
</view> -->
<!-- <view class="list acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'" ref="container" v-if="!isIntegral">
<view @click="goGoodsCon(item)" class="item" :class="Switch === true ? '' : 'on'" v-for="(item, productListIndex) in productList" :key="productListIndex" :title="item.storeName">
<view class="pictrue" :class="Switch === true ? '' : 'on'">
<image :src="item.image" :class="Switch === true ? '' : 'on'" />
@ -55,31 +105,33 @@
<text class="num">{{ item.integral }}积分</text>
</view>
<view class="vip acea-row row-between-wrapper" :class="Switch === true ? '' : 'on'">
<!-- <view class="vip-money">{{ item.otPrice }}</view> -->
<view class="vip-money">{{ item.otPrice }}</view> ???
<view>已售{{ item.sales }}</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<view class="noCommodity" style="background-color: #fff" v-if="productList.length === 0 && where.page > 1">
</view> -->
<!-- <view class="noCommodity" style="background-color: #fff" v-if="productList.length === 0 && where.page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noGood.png`" class="image" />
</view>
</view>
<Recommend v-if="productList.length === 0 && where.page > 1" :recommendLoading="recommendLoading" @changeRecommendLoading="changeRecommendLoading"></Recommend>
</view> -->
<!-- <Recommend v-if="productList.length === 0 && where.page > 1" :recommendLoading="recommendLoading" @changeRecommendLoading="changeRecommendLoading"></Recommend> -->
</view>
</template>
<script>
import Recommend from '@/components/Recommend'
import { getProducts, getProductsIntegral } from '@/api/store'
import Loading from '@/components/Loading'
import PromotionGood from '@/components/PromotionGood';
export default {
name: 'GoodsList',
components: {
Recommend,
Loading,
PromotionGood
},
props: {},
data: function() {
@ -87,6 +139,8 @@ export default {
id = 0,
title = ''
return {
CustomBar: this.CustomBar,
CustomBarLeft: this.CustomBarLeft,
hostProduct: [],
productList: [],
Switch: true,
@ -143,6 +197,25 @@ export default {
},
onHide() {},
methods: {
close() {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //
if (prevPage.route == 'pages/shop/GoodSearch/index') {
prevPage.$vm.search = '';
}
// this.$yrouter.back();
this.where.keyword=''
},
//
submit(e) {
this.productList=[]
this.where.page=1
this.where.keyword=e.detail.value.trim()
let search = this.where.keyword || "";
if (!search) return;
this.loading=false
this.getProductList(search)
},
changeRecommendLoading(recommendLoading) {
this.recommendLoading = recommendLoading
},
@ -176,7 +249,9 @@ export default {
this.loading = true
var that = this
this.setWhere()
const { s = '', id = 0, title = '' } = this.$yroute.query
const { s = '', id = '', title = '' } = this.$yroute.query
this.$yroute.query.s=this.where.keyword
if (s !== this.where.keyword || id !== this.where.sid) {
this.loadend = false
this.loading = false
@ -212,41 +287,44 @@ export default {
this.getProductList()
},
//
set_where: function(index) {
const { s = '', id = 0, title = '', isIntegral = false } = this.$yroute.query
let that = this
set_where(index) {
const { s = '', id = 0, title = '', isIntegral = false } = this.$yroute.query;
switch (index) {
case 0:
this.where.keyword = ''
if(this.stock !== 0 || this.price !== 0) {
this.price = 0;
this.stock = 0;
}
break
case 1:
if (that.price === 0) that.price = 1
else if (that.price === 1) that.price = 2
else if (that.price === 2) that.price = 0
that.stock = 0
if (this.price === 0) this.price = 1
else if (this.price === 1) this.price = 2
else if (this.price === 2) this.price = 1
// else if (that.price === 2) that.price = 0
this.stock = 0
this.where.keyword = s
break
case 2:
if (that.stock === 0) that.stock = 1
else if (that.stock === 1) that.stock = 2
else if (that.stock === 2) that.stock = 0
that.price = 0
if (this.stock === 0) this.stock = 2
// if (that.stock === 0) that.stock = 1
// else if (that.stock === 1) that.stock = 2
// else if (that.stock === 2) that.stock = 0
this.price = 0
this.where.keyword = s
break
case 3:
that.nows = !that.nows
this.nows = !this.nows
this.where.keyword = s
break
default:
break
}
this.productList = []
that.$set(that, 'productList', [])
that.where.page = 1
that.target = true
that.loadend = false
that.getProductList()
this.$set(this, 'productList', [])
this.where.page = 1
this.target = true
this.loadend = false
this.getProductList()
},
//where
setWhere() {
@ -273,8 +351,127 @@ export default {
}
</script>
<style scoped lang="less">
.noCommodity {
border-top: 3px solid #f5f5f5;
padding-bottom: 1px;
}
// .noCommodity {
// border-top: 3px solid #f5f5f5;
// padding-bottom: 1px;
// }
.productList {
.backImg {
height: 62rpx;
width: 62rpx;
margin-left: 26rpx;
}
.search {
input {
width: 90%;
// width: 376rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.iconfont {
font-size: 28rpx;
color: #999999;
font-weight: 600;
}
}
}
.content {
width: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.nav {
width: 100vw;
height: 104rpx;
padding: 32rpx 32rpx 26rpx;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
min-width: 66rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: SourceHanSansSCVF;
font-weight: 400;
color: #999999;
line-height: 38rpx;
.jiantou {
width: 0rpx;
height: 0rpx;
border-top: 0rpx solid transparent;
border-left: 6rpx solid transparent;
border-bottom: 10rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 4rpx;
}
.up {
border-top: 0rpx solid transparent;
border-bottom: 10rpx solid #999999;
}
.down {
border-top: 10rpx solid #999999;
border-bottom: 0rpx solid transparent;
}
}
.active {
color: #3A3A3C;
font-weight: 500;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
.list-box {
padding-top: 108rpx;
}
}
.no-product {
padding-top: 116rpx;
font-size: 34rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 48rpx;
text-align: center;
.image {
width: 446rpx;
margin: 0rpx auto 24rpx;
}
.tip {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3A3A3C;
line-height: 19px;
margin-bottom: 76rpx;
}
}
</style>

654
pages/shop/HotNewGoods/index.vue

@ -1,53 +1,330 @@
<template>
<view class="quality-recommend">
<view class="title acea-row row-center-wrapper">
<view class="header">
<cu-custom :isBack="true" :isCenter="true" bgColor="''">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">热门榜单</view>
</block>
</cu-custom>
</view>
<view class="banner-box">
<swiper class="swiper" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item" @click="goBannerDetail">
<image class="swiper-image " :src="item.pic" mode="aspectFill" lazy-load>
</image>
</swiper-item>
</swiper>
<!-- <view class="dots acea-row">
<view :class="'dot ' + (swiperCurrent === index ? 'dot-active' : '')" v-for="(dot, index) in banner.length" :key="index"></view>
</view> -->
</view>
<view class="content-box">
<scroll-view class="classify-scroll" scroll-x="true">
<view class="classify-box">
<view v-for="(item,index) in classifyList" :key="index" @click="changeClassify(index)">
<view :class="'classify-item acea-row row-middle ' + (classifyType == index?'on':'')">
<image :src="item.listImage" mode="aspectFill"></image>
</view>
</view>
</view>
</scroll-view>
<scroll-view class="nav-scroll" scroll-x="true">
<view class="nav-box">
<!-- <view class="item on">全部</view> -->
<picker class="item" @change="bindPickerChange" :value="mouthIndex" :range="mouthList" v-if="mouthList.length">
<view class="nav-name">{{form.mouth}}</view>
<view class="jiantou-down"></view>
</picker>
<view class="item" @click="setSort">
<view class="nav-name">价格</view>
<view class="jiantou-up" v-if="form.priceOrder == 'asc'"></view>
<view class="jiantou-down" v-else-if="form.priceOrder == 'desc'"></view>
</view>
<picker class="item" @change="bindPickerSubclassChange" :value="subclassIndex" :range="subclassList" range-key="cateName" v-if="subclassList.length">
<view class="nav-name">{{subclass.cateName}}</view>
<view class="jiantou-down"></view>
</picker>
<view><view class="nav-name" style="margin-right: 12rpx;"></view></view>
</view>
</scroll-view>
<view class="notice-box acea-row row-middle">
<image src="@/static/images/laba.png" mode="aspectFill"></image>
<view class="uni-notice-bar-box">
榜单每月30号统计下月1号左右更新
<!-- <uni-notice-bar color="#999999" backgroundColor="#F5F6F8" scrollable="true" single="true" :speed="50" fontSize="20rpx" text="榜单每月30号统计,下月1号左右更新"></uni-notice-bar> -->
</view>
</view>
<view class="list-box">
<view class="top-box">
<view class="top-item acea-row" v-for="(item,index) in goodsList" :key="index" @tap="goGoodsCon(item)">
<!-- <view class="top-item acea-row" v-for="(item,index) in topList" :key="index" @tap="goGoodsCon(item)"> -->
<view class="top-num-box">
<view class="">{{index+1}}</view>
<view class="tip">{{index===0?'ST':index===1?'ND':index===2?'RD':'TH'}}</view>
</view>
<image class="img" :src="item.image" mode="aspectFill"></image>
<view class="info-box">
<view class="title more-t">{{item.storeName}}</view>
<view class="price-box" v-if="item.isIntegral === 1">{{ item.integral }}积分</view>
<view class="price-box" v-else>¥{{ item.price }}<text>¥{{item.otPrice}}</text></view>
<view class="original">{{ saleNum(item.sales) }}+人购买</view>
</view>
</view>
</view>
<!-- <view class="goods-list acea-row row-between" v-if="goodsList.length">
<view class="goods-item" v-for="(item, promotionGoodIndex) in goodsList" :key="promotionGoodIndex" @tap="goGoodsCon(item)">
<view class="img-box">
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image>
</view>
<view class="name more-t">{{ item.storeName }}</view>
<view class="price-box">
<view class="current" v-if="item.isIntegral === 1">{{ item.integral }}积分</view>
<view class="current" v-else>¥{{ item.price }}<text>¥{{item.otPrice}}</text></view>
</view>
</view>
</view> -->
</view>
</view>
<!-- <view class="title acea-row row-center-wrapper">
<view class="line"></view>
<view class="name">
<text class="iconfont" :class="icon"></text>{{ name }}
</view>
<view class="line"></view>
</view>
<GoodList :good-list="goodsList" :is-sort="false"></GoodList>
<GoodList :good-list="goodsList" :is-sort="false"></GoodList> -->
</view>
</template>
<script>
// import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import GoodList from "@/components/GoodList";
import { getGroomList } from "@/api/store";
import { getBanner, getHotListData, getHotList, getGroomList } from "@/api/store";
export default {
name: "HotNewGoods",
components: {
// UniNoticeBar,
GoodList
},
props: {},
data: function() {
return {
imgUrls: [],
banner: [],
classifyType: -1,
classifyList: [],
mouthList: [],
mouthIndex: 0,
// mouth: '',
subclassList: [],
subclassIndex: 0,
subclass: {},
form: {
mouth: '', //
hotListId: null, // ID
cateId: null, // ID
page: 1,
limit: 30,
priceOrder: '', // desc/asc
salesOrder: '',
},
// topList: [],
goodsList: [],
name: "",
icon: "",
RecommendSwiper: {
pagination: {
el: ".swiper-pagination",
clickable: true
},
autoplay: {
disableOnInteraction: false,
delay: 2000
},
loop: true,
speed: 1000,
observer: true,
observeParents: true
}
// name: "",
// icon: "",
// RecommendSwiper: {
// pagination: {
// el: ".swiper-pagination",
// clickable: true
// },
// autoplay: {
// disableOnInteraction: false,
// delay: 2000
// },
// loop: true,
// speed: 1000,
// observer: true,
// observeParents: true
// }
// isShow:false,
// isShowBind:false
};
},
computed: {
saleNum(sales) {
return (sales) => {
let length = String(sales).length,
num = String(sales)[0];
length = length - 1;
if(length > 0) {
for (let i = 0; i < length; i++) {
num += '0'
}
}
return num
}
}
},
mounted: function() {
this.titleInfo();
this.getIndexGroomList();
// this.titleInfo();
// this.getIndexGroomList();
getBanner(4).then(res => {
this.$set(this,'banner',res.data.banner)
})
this.getHotListData();
},
methods: {
titleInfo: function() {
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
getHotListData() {
getHotListData().then(res => {
this.hotListData = res.data;
this.mouthList = res.data.mouthList;
this.mouthList.map(item=>{
this.hotListData.hotListDTOS=this.hotListData[item].hotListDTOS.forEach(res=>{
res.cateDtos.unshift({
cateId:'',
cateName:'全部',
})
})
return this.hotListData.hotListDTOS
})
this.form.mouth = this.mouthList[0];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
if(this.$yroute.query.hotName){
this.classifyList.forEach((hot,hotIndex)=>{
if(hot.listName===this.$yroute.query.hotName) {
this.subclassList = this.classifyList[hotIndex].cateDtos;
this.subclass = this.subclassList[0];
this.form.cateId = this.subclass.cateId;
this.changeClassify(hotIndex)
}
})
}else{
// this.form.hotListId = this.classifyList[this.classifyType].id;
this.form.hotListId = '';
this.subclassList = this.classifyList[0].cateDtos;
this.subclass = this.subclassList[0];
// this.form.cateId = this.subclass.cateId;
this.form.cateId = ' ';
this.classifyType=0
this.getHotList();
}
})
},
//
bindPickerChange(e) {
if(this.mouthIndex == e.detail.value) return;
this.mouthIndex = e.detail.value;
this.subclassIndex=0
this.form.mouth = this.mouthList[this.mouthIndex];
this.goodsList = [];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
if(this.classifyList[this.classifyType]) {
this.form.hotListId = this.classifyList[this.classifyType].id;
this.subclassList = this.classifyList[this.classifyType].cateDtos;
this.subclass = this.subclassList[0];
this.form.cateId = this.subclass.cateId;
this.getHotList();
}
},
//
changeClassify(i) {
if(this.classifyType == i) return
this.classifyType = i;
this.form.hotListId = this.classifyList[this.classifyType].id;
this.goodsList = [];
this.getHotList();
},
//
bindPickerSubclassChange(e) {
// if(this.subclassIndex == e.detail.value) return;
if(e.detail.value!=0 && this.subclassIndex == e.detail.value) {
return;
}else{
if(e.detail.value=="0"){
this.form.hotListId=''
this.form.cateId=''
}else{
this.subclass = this.subclassList[e.detail.value];
this.form.cateId = this.subclass.cateId;
}
}
this.isShowBind=true
this.subclassIndex = e.detail.value;
this.subclass = this.subclassList[this.subclassIndex];
// this.form.cateId = this.subclass.cateId;
this.goodsList = [];
this.getHotList();
},
getHotList() {
uni.showLoading({
title: ''
})
getHotList(this.form).then(res => {
this.goodsList = res.data;
uni.hideLoading();
// this.goodsList = this.sortData(res.data, 5);
})
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
if (oArr.length > length) {
this.topList = oArr.slice(0, length);
arr = oArr.slice(length, oArr.length);
} else {
this.topList = oArr;
}
return arr;
},
setSort() {
if (this.form.priceOrder == '') this.form.priceOrder = 'asc'
else if (this.form.priceOrder == 'asc') this.form.priceOrder = 'desc'
else if (this.form.priceOrder == 'desc') this.form.priceOrder = ''
this.goodsList = [];
this.getHotList();
},
goGoodsCon(item) {
if(item.isIntegral === 1) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
}
},
/* titleInfo: function() {
let type = this.$yroute.query.type;
if (type === "1") {
this.name = "精品推荐";
@ -68,7 +345,7 @@ export default {
let type = this.$yroute.query.type;
getGroomList(type)
.then(res => {
that.imgUrls = res.data.banner;
// that.banner = res.data.banner;
that.goodsList = res.data.list;
})
.catch((err)=> {
@ -78,7 +355,332 @@ export default {
duration: 2000
});
});
}
} */
}
};
</script>
<style lang="less" scoped>
.header {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.banner-box {
width: 750rpx;
height: 472rpx;
.swiper {
width: 100%;
height: 100%;
.swiper-item {
.swiper-image {
width: 100%;
height: 100%;
}
}
}
/* .dots {
position: absolute;
bottom: 82rpx;
left: 50%;
transform: translateX(-50%);
z-index: 1;
.dot {
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 6rpx;
margin: 0rpx 8rpx;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
.dot-active {
width: 34rpx;
background: #3A3A3C;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
} */
}
.content-box {
position: absolute;
left: 0;
bottom: 0;
width: 100vw;
height: calc(100vh - 412rpx);
background: #FFFFFF;
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.1);
border-radius: 28rpx 28rpx 0rpx 0rpx;
.classify-scroll {
position: relative;
top: -60rpx;
margin-bottom: -60rpx;
height: 120rpx;
overflow:hidden;
white-space:nowrap;
.classify-box {
padding-left: 32rpx;
padding-right: 12rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.classify-item {
width: 176rpx;
height: 96rpx;
text-align: center;
margin-right: 20rpx;
image {
width: 176rpx;
height: 96rpx;
border-radius: 16rpx;
transition: all .3s linear;
// background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
}
transition: width .3s linear;
}
.classify-item.on {
width: 220rpx;
height: 120rpx;
transition: width .3s linear;
image {
width: 220rpx;
height: 120rpx;
transition: all .3s linear;
}
}
}
}
}
.content-box .nav-scroll {
overflow:hidden;
white-space:nowrap;
}
.content-box .nav-box {
display: flex;
flex-wrap: nowrap;
padding: 20rpx 32rpx;
margin-right: 32rpx;
.item {
height: 40rpx;
border-radius: 16rpx;
border: 2rpx solid #2EB5AE;
padding: 0rpx 18rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 36rpx;
margin-right: 20rpx;
.nav-name,.jiantou-down,.jiantou-up {
display: inline-block;
}
.jiantou-down,.jiantou-up {
margin-bottom: 4rpx;
}
}
.item.on {
width: 124rpx;
background: #2DB5AE;
color: #FFFFFF;
text-align: center;
}
}
.jiantou-down {
width: 0;
height: 0;
border-top: 10rpx solid #2EB5AE;
border-bottom: 0rpx;
border-left: 6rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 2rpx;
}
.jiantou-up {
width: 0;
height: 0;
border-bottom: 10rpx solid #2EB5AE;
border-top: 0rpx;
border-left: 6rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 2rpx;
}
.notice-box {
margin: 0rpx 32rpx 18rpx;
padding: 0rpx 16rpx;
height: 38rpx;
background: #F5F6F8;
border-radius: 16rpx;
image {
width: 26rpx;
height: 26rpx;
}
.uni-notice-bar-box {
width: 628rpx;
padding-left: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #999999;
line-height: 26rpx;
}
}
.list-box {
height: calc(100% - 200rpx);
overflow-y: scroll;
.top-box {
padding: 0rpx 32rpx 12rpx;
.top-item {
width: 686rpx;
height: 174rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
.top-num-box {
width: 146rpx;
height: 174rpx;
padding: 24rpx 0rpx 24rpx 12rpx;
font-size: 80rpx;
font-family: Futura;
font-weight: 700;
color: #2DB5AE;
line-height: 106rpx;
text-align: center;
.tip {
font-size: 32rpx;
line-height: 42rpx;
position: relative;
top: -22rpx;
}
}
.img {
width: 168rpx;
height: 162rpx;
border-radius: 8rpx;
margin: 6rpx 0rpx;
}
.info-box {
width: 370rpx;
height: 174rpx;
padding: 16rpx 18rpx 16rpx 10rpx;
.title {
height: 76rpx;
font-size: 26rpx;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.price-box {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
text {
font-size: 20rpx;
font-weight: 500;
color: #999999;
line-height: 26rpx;
text-decoration: line-through;
padding-left: 10rpx;
}
}
.original {
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
}
}
}
}
}
.list-box .goods-list {
padding: 0rpx 32rpx 8rpx;
.goods-item {
width: 332rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
.img-box {
width: 332rpx;
height: 316rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
overflow: hidden;
.img {
width: 100%;
height: 100%;
background-color: #fff;
}
}
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
height: 76rpx;
margin: 10rpx 16rpx;
}
.price-box {
padding: 0rpx 16rpx 26rpx;
width: 100%;
box-sizing: border-box;
text-align: center;
.current {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
text {
padding-left: 10rpx;
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
font-weight: 500;
text-decoration: line-through;
}
}
}
}
}
</style>

280
pages/shop/IntegralGoodsCon/index.vue

@ -1,64 +1,113 @@
<template>
<view :class="productConClass">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
</cu-custom>
</view>
<view v-if="storeInfo.id">
<!-- 轮播图 -->
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
<!-- 商品信息描述 -->
<view class="wrapper">
<view class="share acea-row row-between row-bottom">
<view class="money font-color-red">
<text class="num">{{ attr.productSelect.integral || storeInfo.integral }}积分</text>
</view>
</view>
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper">
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</view>
<view class="top">
<view class="share acea-row row-between row-bottom">
<view class="money font-color-red">
<text class="num">{{ attr.productSelect.integral || storeInfo.integral }}积分</text>
</view>
</view>
<view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper">
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</view>
</view>
</view>
<!-- 规格 -->
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<view>
<text>{{ attrTxt }}</text>
<text class="atterTxt">{{ attrValue }}</text>
<view>选规格</view>
<view class="acea-row attr-content">
<image v-if="item.image" :src="item.image" v-for="(item,index) in attrImages" :key="index" mode="aspectFill"></image>
<view class="attrs">{{attr.productAttr[0].attrValueArr.length}}{{attr.productAttr.length == 1?attr.productAttr[0].attrName:attr.productAttr[0].attrValueArr.length == 1?attr.productAttr[1].attrName:attr.productAttr[0].attrName}}可选</view>
<!-- <text>{{ attrTxt }}</text>
<text class="atterTxt">{{ attrValue }}</text> -->
</view>
<view class="iconfont icon-jiantou"></view>
<view class="jiantou-right"></view>
<!-- <view class="iconfont icon-jiantou"></view> -->
</view>
<!-- 用户评价 -->
<view class="userEvaluation" v-if="replyCount">
<view class="title acea-row row-between-wrapper">
<view>用户评价({{ replyCount }})</view>
<text @click="goEvaluateList(id)" class="praise">
<text class="font-color-red">{{ replyChance }}%</text>好评率
<text class="iconfont icon-jiantou"></text>
</text>
<view class="acea-row row-middle">
<text>评价</text>
<text class="replyCount">{{ replyCount }}</text>
</view>
<view @click="goEvaluateList(id)" class="praise acea-row row-middle">
<view>好评率{{ replyChance }}%</view>
<view class="jiantou-right"></view>
</view>
</view>
<user-evaluation :reply="reply"></user-evaluation>
</view>
<view class="product-parameter" v-if="storeInfo.parameter.length > 0">
<view class="title">商品参数</view>
<view :class="'parameter-list ' + (isUnfold?'unfold':'')" :style="isUnfold?'height: auto;':'max-height: 184rpx;'">
<view class="parameter-item acea-row" v-for="(item,index) in storeInfo.parameter" :key="index">
<view class="parameter-name one-t">{{item.name}}</view>
<view class="parameter">{{item.details}}</view>
</view>
</view>
<view v-if="storeInfo.parameter.length > 4" class="more-box acea-row row-center-wrapper" @click="unfold" :style="isUnfold?'height: 50rpx;padding-top: 0rpx;':''">
<view>{{isUnfold?'收起':'展开'}}</view>
<view v-if="isUnfold" class="jiantou-up"></view>
<view v-else class="jiantou-down"></view>
</view>
</view>
<!-- 商品详情 -->
<view class="product-intro">
<text class="title"><text>产品介绍</text></text>
<view class="conter" v-html="storeInfo.description"></view>
<view class="title">商品展示</view>
<!-- <view class="conter" v-html="storeInfo.description"></view> -->
<view class="conter">
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="storeInfo.description" @linktap="linktap" />
</view>
</view>
<view style="height: 100rpx"></view>
<view :style="addBottom?'height: 162rpx;':'height: 122rpx;'"></view>
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper">
<view class="item" @click="goHome">
<view class="footer acea-row row-between" :style="addBottom?'height: 162rpx;':'height: 122rpx;'">
<!-- <view class="item" @click="goHome">
<view class="iconfont icon-shouye-xianxing"></view>
<text>首页</text>
</view>
</view> -->
<view class="bnt in-bnt acea-row">
<view class="buy" @click="tapBuy">
<text>立即兑换</text>
</view>
</view>
</view>
<!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry">
{{entryInfo.entryInfo}}
</view>
</scroll-view>
</view>
</view>
<!-- 商品规格弹窗 -->
<ProductWindow :isIntegral="isIntegral" v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
<!-- 分享海报 -->
@ -76,7 +125,7 @@ import CouponPop from '@/components/CouponPop'
import ProductWindow from '@/components/ProductWindow'
import StorePoster from '@/components/StorePoster'
import ShareInfo from '@/components/ShareInfo'
import { getProductDetail, postCartAdd, getCartCount, getProductCode } from '@/api/store'
import { getProductDetail, postCartAdd, getCartCount, getProductCode, getEntry } from '@/api/store'
import { getCoupon, getCollectAdd, getCollectDel, getUserInfo } from '@/api/user'
import cookie from '@/utils/store/cookie'
import { isWeixin, PosterCanvas, handleQrCode, handleUrlParam, getCurrentPageUrlWithArgs } from '@/utils'
@ -98,6 +147,7 @@ export default {
},
data: function() {
return {
addBottom: this.addBottom,
shareInfoStatus: false,
weixinStatus: false,
mapShow: false,
@ -121,6 +171,7 @@ export default {
},
isOpen: false, //
productValue: [],
attrImages: [],
id: 0,
storeInfo: {},
couponList: [],
@ -150,7 +201,15 @@ export default {
qqmapsdk: null,
productConClass: 'product-con',
tempName: '全国包邮',
isIntegral: false,
isIntegral: true,
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
// p: 'text-indent:2em;',
// span: 'padding: 0rpx 32rpx !important;display: inline-block;',
img: 'padding:0;margin:0;font-size:0;display:block;'
},
showEntry: false,
entryInfo: {}
}
},
computed: mapGetters(['isLogin', 'location']),
@ -170,6 +229,7 @@ export default {
} else {
this.id = this._route.query.id
}
url.isIntegral = 'true';
this.isIntegral = url.isIntegral == 'true'
this.productCon()
this.setOpenShare()
@ -272,7 +332,8 @@ export default {
})
getProductDetail(that.id, from)
.then(res => {
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"');
// res.data.storeInfo.description = res.data.storeInfo.description.replace(/&nbsp;/gi, ' ');
that.$set(that, 'storeInfo', res.data.storeInfo)
// attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr)
@ -307,6 +368,10 @@ export default {
that.updateTitle()
that.DefaultSelect()
that.getCartCount()
for(let i in that.productValue) {
that.attrImages.push(that.productValue[i]);
if(that.attrImages.length == 2) return
}
})
.catch(err => {
uni.showToast({
@ -581,6 +646,24 @@ export default {
// 1=
this.goCat(1)
},
linktap(e) {
// console.log('description', e.innerText);
// var ctx = this.selectComponent('#article');
// console.log('description11111111', ctx);
if (e.innerText == this.entryInfo.entryName) {
this.showEntry = true;
return;
}
getEntry({
name: e.innerText
}).then(res => {
this.entryInfo = res.data;
this.showEntry = true;
})
},
closeEntry() {
this.showEntry = false;
},
listenerActionSheet: function() {
if (isWeixin() === true) {
this.weixinStatus = true
@ -635,6 +718,133 @@ export default {
</script>
<style scoped lang="less">
.header {
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.product-con .attribute {
.attr-content {
width: 548rpx;
padding-left: 20rpx;
padding-right: 12rpx;
image {
width: 46rpx;
height: 46rpx;
border-radius: 8rpx;
border: 2rpx solid #E3E3E3;
margin-right: 20rpx;
}
.attrs {
padding: 0rpx 8rpx;
min-width: 158rpx;
height: 46rpx;
background: #E3E3E3;
border-radius: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 46rpx;
text-align: center;
}
}
}
.jiantou-right {
width: 0;
height: 0;
border-top: 6rpx solid transparent;
border-left: 10rpx solid #2DB5AE;
border-bottom: 6rpx solid transparent;
border-right: 0rpx solid transparent;
margin-left: 8rpx;
}
.userEvaluation .title .replyCount {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
padding-left: 8rpx;
}
.product-parameter {
margin: 0rpx 32rpx 20rpx;
padding: 16rpx 24rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
position: relative;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
.title {
font-size: 30rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 46rpx;
padding-bottom: 22rpx;
}
.parameter-list {
overflow: hidden;
.parameter-item {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 40rpx;
padding-bottom: 6rpx;
.parameter-name {
padding: 0rpx 20rpx;
width: 172rpx;
height: 40rpx;
background: #E3E3E3;
margin-right: 6rpx;
}
.parameter {
padding: 0rpx 20rpx;
width: 460rpx;
height: 40rpx;
background: #E3E3E3;
}
}
}
.unfold {
overflow: visible;
padding-bottom: 26rpx;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.more-box {
width: 686rpx;
height: 76rpx;
border-radius: 0rpx 0rpx 16rpx 16rpx;
padding-top: 10rpx;
position: absolute;
left: 0;
bottom: 0;
// z-index: 1;
background: linear-gradient(180deg, rgba(243, 243, 243, 0.4) 0%, #FFFFFF 100%);
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 26rpx;
}
}
.geoPage {
position: fixed;
width: 100%;
@ -801,8 +1011,16 @@ export default {
filter: blur(2px);
}
.product-con .product-intro .conter view {
width: 100% !important;
.product-con .product-intro .conter {
background-color: #FFFFFF;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
padding: 0rpx 30rpx;
view {
width: 100% !important;
}
}
.generate-posters {

959
pages/shop/ShoppingCart/index.vue

File diff suppressed because it is too large Load Diff

267
pages/shop/brands/brandAll/index.vue

@ -0,0 +1,267 @@
<template>
<view class="page">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">全部品牌</view>
</block>
</cu-custom>
</view>
<!-- 搜索 -->
<view v-if="brandList" class="search acea-row row-middle" @click="goGoodSearch" :style="[{top:CustomBar + 'px'}]">
<image class="search-img" src="@/static/images/search.png" mode=""></image>
<text>搜索</text>
</view>
<view class="concent-box acea-row">
<view class="scoll-left">
<scroll-view class="scroll-box" scroll-y="true" :scroll-into-view="scollId" scroll-with-animation="true"
show-scrollbar="false" @scroll="scrollLoad($event)">
<view :id="'item-'+key" class="navLeftName" v-for="(val,key) in brandList" :key="val">
<view class="moulding-box acea-row row-middle row-between">
<view class="moulding-left"></view>
<view class="nav-title">{{key}}</view>
<view class="moulding-right"></view>
</view>
<view class="item-box acea-row row-top">
<view class="brand-item acea-row row-middle row-center-column row-center"
v-for="(item,index) in val" :key="index" @click="goDetail(item)">
<image class="brand-img" :src="item.pic" mode="aspectFill"></image>
<view class="brand-text line2">{{item.brandName}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="scoll-right">
<view scroll-y="true" class="acea-row row-center-column">
<view class="navRightName" :class="{'active':isLight==b}" v-for="(b,i) in navRight"
@click="brandListId(b,i)" :key="i">{{b}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getBrandByName
} from '@/api/store';
export default {
data() {
return {
CustomBar: this.CustomBar,
brandList: {},
navRight: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ#',
scollId: '',
isLight: -1,
rectInfoList:[]
}
},
onLoad() {
this.getBrandList();
this.getRectInfo()
},
methods: {
getRectInfo(){
var top=0
var bottom=0
var temp=0
for(let key in this.brandList){
let view=uni.createSelectorQuery().select('#item-'+key);
view.boundingClientRect(data=>{
top=temp;
bottom=top+data.height;
temp=bottom;
this.rectInfoList.push({
'top':parseInt(top),
'bottom':parseInt(bottom),
key
})
}).exec();
}
},
scrollLoad(e){
if(this.rectInfoList.length==0){
this.getRectInfo()
}
let scrollTop=e.target.scrollTop;
for(let i=0;i<this.rectInfoList.length;i++){
if(i<=this.rectInfoList.length-2){
let top=this.rectInfoList[i].top;
let bottom=this.rectInfoList[i+1].bottom;
if(scrollTop>=top && scrollTop<bottom){
this.isLight=this.rectInfoList[i].key
}
}
}
},
goGoodSearch() {
this.$yrouter.push({
path: '/pages/shop/GoodSearch/index',
})
},
brandListId(b, i) {
if (this.isLight === i) return
this.scollId = 'item-' + b
this.isLight = b
},
getBrandList() {
uni.showLoading({
title: '加载中...'
})
getBrandByName().then(res => {
this.brandList = res.data;
uni.hideLoading();
})
},
goDetail(item) {
this.$yrouter.push({
path: '/pages/shop/brands/brandDetail/index',
query: {
id: item.id,
},
})
},
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.search {
position: fixed;
z-index: 20;
height: 62rpx;
width: 690rpx;
margin: 0 0 0 30rpx;
border: 1rpx solid #999;
border-radius: 16rpx;
background-color: #E3E3E3;
color: #999;
.search-img {
width: 40rpx;
height: 40rpx;
vertical-align: middle;
margin: 0 20rpx;
}
text {
font-size: 28rpx;
}
}
.concent-box {
margin-top: 62rpx;
padding: 30rpx;
.scoll-left {
width: 100%;
.scroll-box {
height: 1450rpx;
}
.item-box{
flex: 1;
.brand-item {
font-family: PingFang SC;
width: 210rpx;
margin-right: 30rpx;
.brand-img {
width: 180rpx;
height: 180rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
}
.brand-text {
margin: 10rpx 0 20rpx 0;
text-align: center;
width: 170rpx;
flex-wrap: wrap;
font-size: 26rpx;
font-family: PingFang SC;
color: #3A3A3A;
line-height: 38rpx;
}
}
.brand-item:nth-child(3n+3){
margin-right: 0;
}
}
.moulding-box {
width: 100%;
margin-bottom: 40rpx;
.moulding-left {
margin-left: 15rpx;
width: 180rpx;
border-bottom: 1rpx solid #999;
}
.moulding-right {
margin-right: 15rpx;
width: 180rpx;
border-bottom: 1rpx solid #999;
}
.nav-title {
font-weight: 800;
font-size: 34rpx;
font-family: PingFang SC;
}
}
}
.scoll-right {
width: 30rpx;
position: fixed;
top: 250rpx;
right: 5rpx;
.scroll-box {
height: 800rpx;
}
.navRightName {
color: #afaeb3;
font-size: 24rpx;
margin-bottom: 5rpx;
font-family: PingFang SC;
}
.active {
color: #2DB5AE;
}
}
}
</style>

340
pages/shop/brands/brandDetail/index.vue

@ -0,0 +1,340 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" bgColor="''">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
</cu-custom>
</view>
<view class="bg">
<image :src="brandInfo.backgroundImage" mode="aspectFill"></image>
</view>
<view :style="[{height:CustomBar + 'px'}]"></view>
<view class="brand-info-box">
<view class="brand-img">
<image :src="brandInfo.pic" mode=""></image>
</view>
<view class="info-box">
<view class="name-info">
<view class="acea-row row-between-wrapper">
<view class="name">{{brandInfo.brandName}}</view>
<view class="brand-tips acea-row">
<view class="tip">甄选品牌</view>
</view>
</view>
<view class="tips">{{''}}</view>
<!-- <view class="tips">{{''||'1314款商品 | 5w+人已购'}}</view> -->
</view>
<view class="info">{{brandInfo.brandDescription}}</view>
<!-- <view class="info line2">{{brandInfo.brandDescription}}</view> -->
</view>
</view>
<view class="wrapper" :style="'min-height:calc(100vh - '+ topHeight +'px)'">
<view class="nav acea-row row-around">
<view class="item" @click="set_where(0)">
<view :class="'title ' + (stock === 0 && price === 0? 'active' : '')">综合</view>
</view>
<view class="item" @click="set_where(2)">
<view :class="'title ' + (stock === 2 ? 'active' : '')">销量</view>
</view>
<view class="item" @click="set_where(1)">
<view :class="'title acea-row row-middle ' + (stock === 0 && price ? 'active' : '')">
<view class="">价格</view>
<view :class="'jiantou ' + (price?price === 1?'up':'down':'')"></view>
</view>
</view>
</view>
<PromotionGood :benefit="productList" />
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</view>
</template>
<script>
import { getBrandDetail, getProducts } from '@/api/store';
import PromotionGood from '@/components/PromotionGood';
import Loading from '@/components/Loading';
export default {
components: {
PromotionGood,
Loading
},
data() {
return {
CustomBar: this.CustomBar,
topHeight: 0,
id: 0,
brandInfo: {},
where: {
page: 1,
limit: 10,
bid: 0,
priceOrder: '',
salesOrder: '',
},
stock: 0,
price: 0,
productList: [],
loaded: false,
loading: false,
};
},
onLoad() {
this.topHeight = this.CustomBar + 132;
this.id = this._route.query.id;
this.where.bid = this.id;
this.getBrandInfo(this.id);
this.getProductList();
},
methods: {
getBrandInfo(id) {
uni.showLoading({
title: '加载中...',
mask: true
})
getBrandDetail(id).then(res => {
this.brandInfo = res.data;
uni.hideLoading();
}).catch(err => {
uni.hideLoading();
})
},
//
set_where(index) {
switch (index) {
case 0:
// if(this.stock !== 0 || this.price !== 0) {
this.price = 0;
this.stock = 0;
// }
break
case 1:
if (this.price === 0) this.price = 1;
else if (this.price === 1) this.price = 2;
else if (this.price === 2) this.price = 1;
this.stock = 0;
break
case 2:
if (this.stock === 0) this.stock = 2;
this.price = 0;
break
default:
break
}
this.productList = [];
this.where.page = 1;
this.loaded = false
this.getProductList();
},
//where
setWhere() {
if (this.price === 0) {
this.where.priceOrder = ''
} else if (this.price === 1) {
this.where.priceOrder = 'asc'
} else if (this.price === 2) {
this.where.priceOrder = 'desc'
}
if (this.stock === 0) {
this.where.salesOrder = ''
} else if (this.stock === 1) {
this.where.salesOrder = 'asc'
} else if (this.stock === 2) {
this.where.salesOrder = 'desc'
}
// this.where.news = this.nows ? '1' : '0'
},
getProductList() {
if (this.loaded) return
this.loading = true;
this.setWhere();
getProducts(this.where).then(res => {
this.productList.push.apply(this.productList, res.data);
this.loaded = res.data.length < this.where.limit; //
console.log('this.loaded', this.loaded)
this.loading = false;
this.where.page = this.where.page + 1;
}).catch(err => {
// uni.hideLoading();
})
}
}
}
</script>
<style lang="less" scoped>
.header {
position: fixed;
top:0;
left:0;
right:0;
z-index: 99;
width: 750rpx;
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.bg {
width: 100vw;
height: 508rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
// background: linear-gradient(135deg, rgba(57, 211, 150, 1), rgba(27, 141, 204, 1));
image {
width: 100%;
height: 100%;
}
}
.brand-info-box {
padding: 62rpx 32rpx 32rpx;
position: relative;
.brand-img {
position: absolute;
top: 14rpx;
left: 64rpx;
width: 138rpx;
height: 138rpx;
border-radius: 16rpx;
padding: 4rpx;
background: linear-gradient(135deg, rgba(57, 211, 150, 1), rgba(27, 141, 204, 1));
image {
width: 100%;
height: 100%;
background: #F5F6F8;
border-radius: 14rpx;
}
}
.info-box {
width: 686rpx;
// height: 158rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 14rpx 32rpx;
.name-info {
padding-left: 152rpx;
font-size: 34rpx;
font-family: SourceHanSansSCVF;
font-weight: bold;
color: #3A3A3C;
line-height: 50rpx;
.brand-tips {
.tip {
width: 76rpx;
height: 26rpx;
background: #2DB5AE;
border-radius: 6rpx;
margin-right: 4rpx;
font-size: 16rpx;
font-family: PingFang SC;
color: #FFFFFF;
line-height: 26rpx;
text-align: center;
}
}
.tips {
height: 28rpx;
padding-top: 6rpx;
font-size: 16rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 22rpx;
}
}
.info {
min-height: 58rpx;
max-height: 124rpx;
// padding-top: 6rpx;
padding-top: 14rpx;
font-size: 16rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 22rpx;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
}
.wrapper {
width: 750rpx;
background: #FFFFFF;
border-radius: 28rpx;
.nav {
width: 100vw;
height: 104rpx;
padding: 32rpx 32rpx 26rpx;
.item {
min-width: 66rpx;
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: SourceHanSansSCVF;
font-weight: 400;
color: #999999;
line-height: 38rpx;
.jiantou {
width: 0rpx;
height: 0rpx;
border-top: 0rpx solid transparent;
border-left: 6rpx solid transparent;
border-bottom: 10rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 4rpx;
}
.up {
border-top: 0rpx solid transparent;
border-bottom: 10rpx solid #999999;
}
.down {
border-top: 10rpx solid #999999;
border-bottom: 0rpx solid transparent;
}
}
.active {
color: #3A3A3C;
font-weight: 500;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 4rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform:scaleX(0);
transition: all .2s cubic-bezier(.18,.89,.17,.88),opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
}
</style>

428
pages/shop/brands/index.vue

@ -0,0 +1,428 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">品牌馆</view>
</block>
</cu-custom>
</view>
<view class="banner-box">
<swiper class="swiper-wrapper" @change="handleChange(item)" :autoplay="true">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex">
<swiper-item @click="goBannerDetail(item)">
<!-- <view class="image">{{item}}</view> -->
<!-- <image class="image" :src="item" class="slide-image" mode="aspectFill"/> -->
<image class="image slide-image" :src="item.pic" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
<view class="dots-box acea-row row-center">
<view class="dot" v-for="(item,index) in imgUrls" :key="index">
<view :class="(currents > index?'active2 ':'active ') + (currents == index?'on':(currents-1 == index?'on2':''))"></view>
</view>
</view>
</view>
<view class="notice-box acea-row row-middle" v-if="noticeInfo.info">
<view class="title">
<image src="../../../static/images/yanjie-logo.png" mode=""></image>
</view>
<view class="min-title acea-row row-between-wrapper">
<view class="">{{noticeInfo.title}}</view>
<image src="../../../static/images/laba.png" mode="aspectFill"></image>
</view>
<view class="uni-notice-bar-box">
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="50" :text="noticeInfo.info"></uni-notice-bar>
</view>
</view>
<view class="brands-box">
<view class="title-box">
<view class="en-title">BRAND SELECTIONS</view>
<view class="acea-row row-between-wrapper">
<view class="title">甄选品牌</view>
<view class="more-box acea-row row-middle" @click.stop="goBrandAll">
<text>全部品牌</text>
<view class="jiantou-right"></view>
</view>
</view>
</view>
<scroll-view scroll-x="true" class="scroll-box">
<view class="scroll">
<view v-for="(item,index) in brandList" :key="index">
<image class="brand-img" :src="item.pic" mode="aspectFill" @click="goDetail(item)"></image>
</view>
</view>
</scroll-view>
</view>
<view class="brands-box">
<view class="title-box">
<view class="en-title">NEW ARRIVALS</view>
<view class="title">新品推荐</view>
</view>
<view class="newList">
<view class="item acea-row row-between" v-for="(item,index) in newList" :key="index" @click="goGoodsCon(item)">
<image class="img" :src="item.image" mode="aspectFill"></image>
<view class="info-box">
<view class="name line1">{{item.storeName}}</view>
<view class="tip line2">{{item.storeInfo}}</view>
<view class="acea-row row-between-wrapper">
<view class="acea-row row-middle">
<image class="brand-img" :src="item.pic"></image>
<view class="brand-title one-t">{{item.brandName}}</view>
</view>
<view class="acea-row row-between-wrapper">
<text>查看详情</text>
<view class="jiantou-right"></view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</view>
</template>
<script>
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import { getBrands, getProducts ,getBanner, getBrandNoticeInfo} from '@/api/store';
import Loading from '@/components/Loading';
export default {
components: {
UniNoticeBar,
Loading
},
data() {
return {
currents: 0,
imgUrls: [],
noticeInfo: {
title: '',
info: ''
},
brandList: [],
where: {
page: 1,
limit: 10,
news: '1',
priceOrder: '',
salesOrder: '',
isIntegral: 0
},
newList: [],
loaded: false,
loading: false,
};
},
onLoad() {
this.getBrandList();
this.getNewProducts();
getBanner(1).then(res => {
this.$set(this,'imgUrls',res.data.banner)
})
getBrandNoticeInfo().then(res => {
this.noticeInfo.title = res.data.title;
this.noticeInfo.info = res.data.info;
})
},
onReachBottom() {
!this.loading && this.getNewProducts();
},
methods: {
goBrandAll(){
this.$yrouter.push({
path: '/pages/shop/brands/brandAll/index',
})
},
handleChange(e) {
this.currents = e.mp.detail.current;
},
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
goDetail(item) {
this.$yrouter.push({
path: '/pages/shop/brands/brandDetail/index',
query: {
id: item.id,
},
})
},
goGoodsCon(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
},
getBrandList() {
uni.showLoading({
title: '加载中...'
})
getBrands().then(res => {
this.brandList = res.data;
uni.hideLoading();
})
},
getNewProducts() {
if (this.loaded) return
this.loading = true;
getProducts(this.where).then(res => {
// uni.hideLoading();
this.newList.push.apply(this.newList, res.data);
this.loaded = res.data.length < this.where.limit; //
this.loading = false;
this.where.page = this.where.page + 1;
})
}
}
}
</script>
<style lang="less" scoped>
.jiantou-right {
width: 0;
height: 0;
border-top: 6rpx solid transparent;
border-left: 10rpx solid #2DB5AE;
border-bottom: 6rpx solid transparent;
border-right: 0rpx solid transparent;
margin-left: 8rpx;
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.banner-box {
padding: 20rpx 32rpx;
.swiper-wrapper {
width: 686rpx;
height: 398rpx;
border-radius: 16rpx;
.image {
width: 686rpx;
height: 398rpx;
border-radius: 16rpx;
}
}
.dots-box {
padding-top: 26rpx;
.dot {
width: 92rpx;
height: 4rpx;
background: #CCEDEB;
margin: 0rpx 6rpx;
position: relative;
.active {
width: 0rpx;
height: 4rpx;
background: #2DB5AE;
position: absolute;
top: 0;
left: 0;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active2 {
width: 0rpx;
height: 4rpx;
background: #2DB5AE;
position: absolute;
top: 0;
left: 92rpx;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active.on {
width: 92rpx;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active.on2 {
width: 92rpx;
left: 0;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
}
}
}
.notice-box {
margin: 0rpx 32rpx 48rpx;
width: 686rpx;
height: 62rpx;
border-radius: 16rpx;
border: 4rpx solid #2DB5AE;
.title {
padding-left: 16rpx;
padding-right: 10rpx;
height: 38rpx;
border-right: 2rpx solid #2DB5AE;
image {
width: 124rpx;
height: 30rpx;
}
}
.min-title {
width: 138rpx;
padding-left: 12rpx;
font-size: 24rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #2DB5AE;
line-height: 32rpx;
image {
width: 26rpx;
height: 26rpx;
}
}
.uni-notice-bar-box {
width: 388rpx;
font-size: 24rpx;
font-family: SourceHanSansSCVF;
font-weight: 500;
color: #2DB5AE;
line-height: 32rpx;
}
}
.brands-box {
padding-bottom: 32rpx;
.title-box {
padding: 0rpx 32rpx 24rpx;
font-family: PingFang SC;
font-weight: 500;
.en-title {
font-size: 20rpx;
font-family: Futura;
font-weight: 600;
color: #999999;
line-height: 22rpx;
}
.title {
font-size: 50rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 68rpx;
}
.more-box {
font-size: 20rpx;
color: #2DB5AE;
line-height: 26rpx;
}
}
}
.brands-box .scroll-box {
width: 100%;
overflow:hidden;
white-space:nowrap;
.scroll {
display: flex;
flex-wrap: nowrap;
padding-left: 32rpx;
padding-bottom: 16rpx;
.brand-img {
width: 126rpx;
height: 126rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-right: 8rpx;
}
view:last-child .brand-img {
margin-right: 16rpx;
}
}
}
.newList {
padding: 0rpx 32rpx;
.item {
width: 100%;
height: 174rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
padding: 6rpx 24rpx 6rpx 6rpx;
.img {
width: 162rpx;
height: 162rpx;
border-radius: 16rpx;
}
.info-box {
width: 472rpx;
padding: 6rpx 0rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #2DB5AE;
line-height: 26rpx;
.name {
font-size: 26rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 38rpx;
}
.tip {
height: 58rpx;
padding-top: 6rpx;
margin-bottom: 18rpx;
color: #999999;
}
.brand-img {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
}
.brand-title {
width: 240rpx;
padding-left: 10rpx;
color: #999999;
}
}
}
}
</style>

92
pages/user/AboutUs/index.vue

@ -0,0 +1,92 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode="" ></image>
</view>
</block>
<block slot="content">
<view class="tab-title">关于我们</view>
</block>
</cu-custom>
</view>
<view class="conter">
<!-- <image class="img" src="../../../static/images/guanyu.jpg" mode="widthFix"></image> -->
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="aboutUsDetail"/>
</view>
</view>
</template>
<script>
import {getAboutUs} from '@/api/user.js';
export default {
data() {
return {
aboutUsDetail:{},
tagStyle: {
img: 'padding:0;margin:0;font-size:0;display:block;'
}
};
},
mounted() {
this.getAbout()
},
methods: {
getAbout(){
uni.showLoading({
title: '加载中',
mask: true,
})
getAboutUs().then(res=>{
uni.hideLoading()
this.aboutUsDetail=res.data.routine_aboutUs.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"')
console.log(res,'=======');
})
}
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.img{
width: 100%;
// height: 100%;
}
.conter {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
// line-height: 32rpx;
// padding: 0rpx 30rpx;
}
</style>

638
pages/user/PersonalData/index.vue

@ -1,210 +1,464 @@
<template>
<view class="personal-data">
<view class="wrapper">
<view class="wrapList">
<view class="item acea-row row-between-wrapper on">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue" @tap="chooseImage">
<div class="pictrue">
<img :src="avatar" />
</div>
<image :src="`${$VUE_APP_RESOURCES_URL}/images/alter.png`" class="alter" />
</view>
<view class="text">
<view class="name line1">{{ userInfo.nickname }}</view>
<view class="phone">
绑定手机号
<text v-if="userInfo.phone">{{ userInfo.phone }}</text>
<text v-else>未绑定</text>
</view>
<view class="personal-data">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">个人资料</view>
</block>
</cu-custom>
</view>
<!-- <view class="wrapper"> -->
<view class="wrapList acea-row row-between-wrapper">
<!-- <view class="item acea-row row-between-wrapper on"> -->
<!-- <view class="picTxt acea-row row-between-wrapper"> -->
<view class="pictrue">
<!-- <div class="pictrue"> @tap="chooseImage" -->
<image class="image" v-if="avatar" :src="avatar" />
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="../../../static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
<!-- </div> -->
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/alter.png`" class="alter" /> -->
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"></button>
</view>
</view>
</view>
<view class="list">
<view class="item acea-row row-between-wrapper">
<view>昵称</view>
<view class="input">
<input type="text" v-model="userInfo.nickname" />
<view class="text">
<view class="name line1">{{ userInfo.nickname || '微信用户' }}</view>
<view v-if="userInfo.phone" class="phone">已绑定手机{{ userInfo.phone }}</view>
<button v-else class="phone phone-btn" open-type="getPhoneNumber" @getphonenumber="phoneLogin">绑定手机号</button>
</view>
<!-- </view> -->
<!-- </view> -->
</view>
<view class="item acea-row row-between-wrapper">
<view>ID号</view>
<view class="input acea-row row-between-wrapper">
<input type="text" :value="userInfo.uid" disabled class="id" />
<text class="iconfont icon-suozi"></text>
<!-- </view> -->
<view class="list">
<view class="item acea-row row-between-wrapper">
<view>昵称</view>
<view class="input">
<input id="nickname-input" type="nickname" v-model="userInfo.nickname" @blur="getNickName()" />
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>手机号</view>
<view class="input">
<!-- <input type="text" v-model="userInfo.phone" placeholder="未绑定"/> -->
<input type="text" v-if="userInfo.phone" v-model="userInfo.phone" placeholder="未绑定"/>
<input type="text" v-else value="未绑定" disabled class="id" />
<view class="item acea-row row-between-wrapper">
<view>眼界ID</view>
<view class="input" style="color: #999999;">
{{userInfo.uid}}
<!-- <input type="text" :value="userInfo.uid" disabled class="id" /> -->
<!-- <text class="iconfont icon-suozi"></text> -->
</view>
</view>
</view>
<view class="item acea-row row-between-wrapper" @click="goChangePassword()">
<view class="item acea-row row-between-wrapper">
<view>生日</view>
<view class="input">
<picker v-if="!userInfo.birthday" mode="date" :value="birthday" @change="bindDateChange">
<view v-if="!birthday" class="empty">点击完善生日</view>
<view v-else>{{birthday}}</view>
</picker>
<view v-else>{{birthday}}</view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view>手机号</view>
<view class="input" style="color: #999999;">
{{userInfo.phone?userInfo.phone:'未绑定'}}
<!-- <input type="text" v-if="userInfo.phone" v-model="userInfo.phone" placeholder="未绑定" disabled/>
<input type="text" v-else value="未绑定" disabled class="id" /> -->
</view>
</view>
<!-- <view class="item acea-row row-between-wrapper" @click="goChangePassword()">
<view>密码</view>
<view class="input acea-row row-between-wrapper">
<text>点击修改密码</text>
<text class="iconfont icon-suozi"></text>
</view>
</view>
</view>
<view class="modifyBnt bg-color-red" @click="submit">保存修改</view>
<!-- #ifndef MP-WEIXIN -->
<view
class="logOut cart-color acea-row row-center-wrapper"
@click="logout"
>退出登录</view>
<!-- #endif -->
</view>
</view> -->
</view>
<view class="modifyBnt bg-color-red" @click="submit">保存</view>
<view class="modifyBnt cancel" @click="cancel">取消</view>
<!-- #ifndef MP-WEIXIN -->
<view class="logOut cart-color acea-row row-center-wrapper" @click="logout">退出登录</view>
<!-- #endif -->
</view>
</template>
<script>
import { mapGetters } from "vuex";
import { trim, isWeixin, chooseImage } from "@/utils";
import { VUE_APP_API_URL } from "@/config";
import {
postUserEdit,
getLogout,
switchH5Login,
getUserInfo,
} from "@/api/user";
import cookie from "@/utils/store/cookie";
import store from "@//store";
import dayjs from "dayjs";
import {
mapGetters
} from "vuex";
import {
trim,
isWeixin,
chooseImage
} from "@/utils";
import {
VUE_APP_API_URL,
BXG_TENANT_ID
} from "@/config";
import {
postUserEdit,
getLogout,
switchH5Login,
getUserInfo,
wxappBindingPhone
} from "@/api/user";
import cookie from "@/utils/store/cookie";
import store from "@/store";
import dayjs from "dayjs";
export default {
name: "PersonalData",
components: {
// VueCoreImageUpload
},
data: function () {
return {
avatar: "",
isWeixin: false,
currentAccounts: 0,
switchUserInfo: [],
userIndex: 0,
};
},
computed: mapGetters(["userInfo"]),
mounted: function () {
this.avatar = this.userInfo.avatar;
this.isWeixin = isWeixin();
this.getUserInfo();
},
methods: {
goChangePassword() {
this.$yrouter.push("/pages/user/ChangePassword/index");
},
switchAccounts: function (index) {
let that = this;
this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex];
if (this.switchUserInfo.length <= 1) return true;
if (userInfo === undefined) {
uni.showToast({
title: "切换的账号不存在",
icon: "none",
duration: 2000,
});
return;
}
if (userInfo.user_type === "h5") {
switchH5Login()
.then(({ data }) => {
uni.hideLoading();
const expires_time = dayjs(data.expires_time);
store.commit("login", data.token, expires_time);
that.$emit("changeswitch", false);
location.reload();
})
.catch((err) => {
uni.hideLoading();
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000,
});
});
} else {
cookie.set("loginType", "wechat", 60);
uni.hideLoading();
this.$store.commit("logout");
this.$emit("changeswitch", false);
}
},
getUserInfo: function () {
let that = this;
getUserInfo().then((res) => {
// let switchUserInfo = res.data.switchUserInfo;
// for (let i = 0; i < switchUserInfo.length; i++) {
// if (switchUserInfo[i].uid == that.userInfo.uid) that.userIndex = i;
// if (
// !that.isWeixin &&
// switchUserInfo[i].user_type != "h5" &&
// switchUserInfo[i].phone === ""
// )
// switchUserInfo.splice(i, 1);
// }
// that.$set(this, "switchUserInfo", switchUserInfo);
});
},
chooseImage() {
chooseImage((img) => {
this.avatar = img;
});
},
export default {
name: "PersonalData",
components: {
// VueCoreImageUpload
},
data: function() {
return {
avatar: "",
isWeixin: false,
currentAccounts: 0,
switchUserInfo: [],
userIndex: 0,
birthday: '',
};
},
computed: mapGetters(["userInfo"]),
mounted: function() {
this.avatar = this.userInfo.avatar;
this.birthday = this.userInfo.birthday;
this.isWeixin = isWeixin();
// this.getUserInfo();
},
methods: {
getNickName() {
uni.createSelectorQuery().in(this) // in(this)
.select("#nickname-input")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?. [0]?.value
let info = JSON.parse(JSON.stringify(this.userInfo))
info.nickname = nickName
this.$store.commit('updateUserInfo', info)
console.log('昵称', nickName)
})
},
goChangePassword() {
this.$yrouter.push("/pages/user/ChangePassword/index");
},
switchAccounts: function(index) {
let that = this;
this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex];
if (this.switchUserInfo.length <= 1) return true;
if (userInfo === undefined) {
uni.showToast({
title: "切换的账号不存在",
icon: "none",
duration: 2000,
});
return;
}
if (userInfo.user_type === "h5") {
switchH5Login()
.then(({
data
}) => {
uni.hideLoading();
const expires_time = dayjs(data.expires_time);
store.commit("login", data.token, expires_time);
that.$emit("changeswitch", false);
location.reload();
})
.catch((err) => {
uni.hideLoading();
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000,
});
});
} else {
cookie.set("loginType", "wechat", 60);
uni.hideLoading();
this.$store.commit("logout");
this.$emit("changeswitch", false);
}
},
getUserInfo: function() {
let that = this;
getUserInfo().then((res) => {
// let switchUserInfo = res.data.switchUserInfo;
// for (let i = 0; i < switchUserInfo.length; i++) {
// if (switchUserInfo[i].uid == that.userInfo.uid) that.userIndex = i;
// if (
// !that.isWeixin &&
// switchUserInfo[i].user_type != "h5" &&
// switchUserInfo[i].phone === ""
// )
// switchUserInfo.splice(i, 1);
// }
// that.$set(this, "switchUserInfo", switchUserInfo);
});
},
onChooseAvatar(e) {
uni.getImageInfo({
src: e.detail.avatarUrl,
success: image => {
// console.log(image)
uni.showLoading({ title: '图片上传中', mask: true })
uni.uploadFile({
url: `${VUE_APP_API_URL}/api/upload`,
file: image,
filePath: image.path,
header: {
Authorization: 'Bearer ' + store.getters.token,
'tenant-id': BXG_TENANT_ID
},
name: 'file',
success: res => {
this.avatar = JSON.parse(res.data).data;
console.log('this.avatar', this.avatar)
},
fail: err => {
uni.showToast({
title: '上传图片失败',
icon: 'none',
duration: 2000,
})
},
complete: res => {
uni.hideLoading()
},
})
},
fail: err => {
uni.showToast({
title: '获取图片信息失败',
icon: 'none',
duration: 2000,
})
},
})
},
chooseImage() {
chooseImage((img) => {
this.avatar = img;
});
},
bindDateChange(e) {
console.log(e)
this.birthday = e.detail.value;
},
//
phoneLogin(e) {
console.log('绑定微信用户手机号', e.mp.detail.code)
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({
title: '绑定中',
})
uni.login({
success: (loginRes) => {
wxappBindingPhone({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
code: loginRes.code
}).then(res => {
uni.hideLoading();
if(res.success) {
getUserInfo().then(user => {
this.userInfo.phone = user.phone;
store.dispatch('setUserInfo', user.data);
})
}
uni.showToast({
title: res.msg,
icon: 'success',
duration: 2000,
})
}).catch(error => {
uni.hideLoading()
this.$store.dispatch('userInfo', true)
console.log(error)
uni.showToast({
title: error.msg || error.response.data.msg || error.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
} else {
uni.showToast({
title: '已拒绝授权',
icon: 'none',
duration: 2000,
})
}
},
submit: function () {
let userInfo = this.userInfo;
postUserEdit({
nickname: trim(this.userInfo.nickname),
avatar: this.avatar,
}).then(
(res) => {
this.$store.dispatch("userInfo", true);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
this.$yrouter.back();
},
(err) => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000,
});
}
);
},
logout: function () {
uni.showModal({
title: "提示",
content: "确认退出登录?",
success: (res) => {
if (res.confirm) {
getLogout()
.then((res) => {
this.$store.commit("logout");
this.$yrouter.replace({
path: "/pages/user/Login/index",
query: {},
});
})
.catch((err) => {});
} else if (res.cancel) {
// console.log("");
}
},
});
},
},
};
submit: function() {
let userInfo = this.userInfo;
// console.log(userInfo, '==============');
let data = {
nickname: '',
avatar: ''
};
if (this.userInfo.nickname) {
data.nickname = trim(this.userInfo.nickname);
}
if (this.avatar) {
data.avatar = this.avatar;
}
if(this.birthday) {
data.birthday = this.birthday;
}
if (!this.userInfo.nickname && !this.avatar && !this.birthday) return
postUserEdit(data).then(
(res) => {
this.$store.dispatch("userInfo", true);
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
this.$yrouter.back();
},
(err) => {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000,
});
}
);
},
cancel() {
this.$yrouter.back();
},
logout: function() {
uni.showModal({
title: "提示",
content: "确认退出登录?",
success: (res) => {
if (res.confirm) {
getLogout()
.then((res) => {
this.$store.commit("logout");
this.$yrouter.replace({
path: "/pages/user/Login/index",
query: {},
});
})
.catch((err) => {});
} else if (res.cancel) {
// console.log("");
}
},
});
},
},
};
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.wrapList {
padding: 20rpx 32rpx 32rpx;
.pictrue {
width: 100rpx;
height: 100rpx;
box-shadow: 0rpx 0rpx 20rpx 10rpx rgba(0, 0, 0, 0.08);
background: linear-gradient(135deg, rgba(27, 141, 204, 1), rgba(57, 211, 150, 1));
padding: 4rpx;
border-radius: 50%;
position: relative;
.image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.noAvatar {
width: 100%;
height: 100%;
border-radius: 50%;
background: #F1F1F1;
image {
width: 90%;
}
}
.avatar-wrapper {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
}
.text {
width: 586rpx;
padding-left: 24rpx;
.name {
font-size: 15px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 21px;
padding-bottom: 10rpx;
}
.phone {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
}
.phone-btn {
width: 136rpx;
height: 32rpx;
background: #F1F1F1;
border: 2rpx solid #2DB5AE;
font-size: 20rpx;
color: #2DB5AE;
line-height: 28rpx;
text-align: center;
border-radius: 8rpx;
margin: 0;
padding: 0;
&::after{
border:none;
}
}
}
}
</style>

135
pages/user/Problem/index.vue

@ -0,0 +1,135 @@
<template>
<view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">常见问题</view>
</block>
</cu-custom>
</view>
<view class="problem-box" v-for="(item,index) in problemList" :key="index">
<view class="problem-item acea-row row-between row-middle" @click="tapSwitch(index)">
<view class="text-box line2">
{{item.problem}}
</view>
<image class="img" :src="`../../../static/images/picker-${number==index?'up':'down'}.png`" mode="">
</image>
</view>
<view class="problem-list" v-if="index==number">
<view class="item">
{{item.answer}}
</view>
</view>
</view>
</view>
</template>
<script>
import {
getProblem
} from '@/api/user.js'
export default {
data() {
return {
number: -1,
problemList:[]
};
},
onLoad() {
this.getMenu()
},
methods: {
getMenu() {
uni.showLoading({
title: '加载中',
mask: true,
})
getProblem().then(res => {
uni.hideLoading()
this.problemList=res.data.routine_problem
// console.log(this.problemList, '======');
})
},
tapSwitch(index) {
if (this.number === index) {
this.number = -1
return
}
this.number = index
}
}
}
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.problem-box {
margin: 30rpx;
padding: 30rpx 30rpx 0 30rpx;
background-color: white;
border-radius: 16rpx;
.problem-item {
flex-wrap: nowrap;
.text-box {
width: 75%;
font-size: 30rpx;
}
padding-bottom: 30rpx;
.img {
width: 30rpx;
height: 20rpx;
}
}
.problem-list {
border-top: 1rpx solid rgb(240, 240, 240);
.item {
margin-top: 20rpx;
font-size: 24rpx;
color: #999;
}
}
.problem-list:last-child {
padding-bottom: 30rpx;
}
}
</style>

690
pages/user/User/index.vue

@ -1,27 +1,43 @@
<template>
<view class="user">
<view v-if="$store.getters.token || userInfo.uid">
<view class="getUserBaseData header bg-color-red acea-row row-between-wrapper" v-if="!userInfo.avatar && !userInfo.nickname">
<view class="bg">
<image src="@/static/images/namecard-bg.png" mode=""></image>
</view>
<view>
<!-- <view v-if="$store.getters.token || userInfo.uid"> -->
<view :style="[{height:StatusBar + 'px'}]"></view>
<!-- <view class="getUserBaseData header bg-color-red acea-row row-between-wrapper" v-if="!userInfo.avatar && !userInfo.nickname">
<button class="userDataBtn" v-if="canIUseGetUserProfile" @tap="getUserInfoProfile">授权并查看用户信息</button>
<button class="userDataBtn" v-else @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看用户信息</button>
</view>
<view class="header bg-color-red acea-row row-between-wrapper" v-else>
</view> -->
<view class="header acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="userInfo.avatar" />
<view class="pictrue" @click="goPersonalData()">
<image class="image" v-if="userInfo.avatar" :src="userInfo.avatar"/>
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="../../../static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
</view>
<view class="text">
<view class="acea-row row-middle">
<view class="name line1">{{ userInfo.nickname }}</view>
<view class="member acea-row row-middle" v-if="userInfo.vip">
<view class="text" v-if="$store.getters.token || userInfo.uid">
<view class="acea-row">
<view class="name line1">{{ userInfo.nickname || '微信用户' }}</view>
<image class="member" v-if="userInfo.vip" :src="userInfo.vipIcon" />
<!-- <image class="member" v-if="userInfo.vip" src="../../../static/images/vip-icon.png" /> -->
<!-- <view class="member acea-row row-middle" v-if="userInfo.vip">
<image :src="userInfo.vipIcon" />
<text>{{ userInfo.vipName }}</text>
</view>
</view> -->
</view>
<view @click="goPersonalData()" class="id" v-if="userInfo.phone">
<text>ID{{ userInfo.uid || 0 }}</text>
<text class="iconfont icon-bianji1"></text>
<view class="id" v-if="userInfo.phone">
<text>账号{{ userInfo.phone.substring(0, 3) }}****{{ userInfo.phone.substring(7, 11) }}</text>
<!-- <text>账号{{ userInfo.phone || userInfo.uid }}</text> -->
<!-- <text class="iconfont icon-bianji1"></text> -->
</view>
<view class="id" v-else>
未绑定手机号
<!-- <text>眼界ID{{ userInfo.uid }}</text> -->
</view>
<!-- #ifdef MP-WEIXIN -->
<!-- <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="binding" v-else>
<text>绑定手机号</text>
@ -34,11 +50,59 @@
</button> -->
<!-- #endif -->
</view>
<button class="text author-btn" v-else open-type="getPhoneNumber" @getphonenumber="phoneLogin">点击登录</button>
</view>
<text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
<image class="set-icon" src="../../../static/images/set-icon.png" mode="" @click="goPersonalData()"></image>
<!-- <text class="iconfont icon-shezhi" @click="goPersonalData()"></text> -->
</view>
<view class="vip-box acea-row row-between-wrapper" v-if="$store.getters.token || userInfo.uid" @click="goVipCenter">
<view class="acea-row row-middle">
<image src="../../../static/images/earth-white.png" mode=""></image>
<text>会员中心</text>
</view>
<view class="more acea-row row-middle">
<text>了解会员</text>
<view class="jiantou-right"></view>
</view>
</view>
<view class="user-info acea-row row-between">
<view class="coupon-box acea-row row-between-wrapper" @click="goUserCoupon">
<view class="title">我的券包</view>
<view class="acea-row row-right" v-if="userInfo.couponCount !== undefined">
<view v-if="String(userInfo.couponCount).length == 1" class="item acea-row row-column-between">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">0</view>
</view>
<view class="item acea-row row-column-between" v-for="(item,index) in String(userInfo.couponCount)" :key="index">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">{{item}}</view>
</view>
</view>
</view>
<view class="coupon-box integral-box acea-row row-between-wrapper" @click="goIntegral()">
<view class="title">我的积分</view>
<view class="acea-row row-right" v-if="userInfo.integral !== undefined">
<view v-if="5-String(userInfo.integral).length > 0" class="item acea-row row-column-between" v-for="(item,index) in 5-String(userInfo.integral).length" :key="index">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">0</view>
</view>
<view class="item acea-row row-column-between" v-for="(item,index) in String(userInfo.integral)" :key="index">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">{{item}}</view>
</view>
</view>
</view>
</view>
<view class="wrapper">
<view class="nav acea-row row-middle">
<!-- <view class="nav acea-row row-middle">
<view @click="goUserAccount()" class="item">
<text>我的余额</text>
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
@ -55,88 +119,117 @@
<text>优惠券</text>
<text class="num">{{ userInfo.couponCount || 0 }}</text>
</view>
</view>
</view> -->
<view class="myOrder">
<view class="title acea-row row-between-wrapper">
<text>我的订单</text>
<text @click="goMyOrder()" class="allOrder">
<text>全部订单</text>
<text class="iconfont icon-jiantou"></text>
</text>
<view @click="goMyOrder(-1)" class="allOrder acea-row row-middle">
<view>全部订单</view>
<view class="jiantou-right"></view>
</view>
</view>
<view class="orderState acea-row row-middle" v-if="userInfo.orderStatusNum !== undefined || userInfo.orderStatusNum !== null">
<view @click="goMyOrder(0)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfk.png`" />
<image src="@/static/images/dfk.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text>
</view>
<view>待付款</view>
</view>
<view @click="goMyOrder(1)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dfh.png`" />
<image src="@/static/images/dfh.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text>
</view>
<view>待发货</view>
</view>
<view @click="goMyOrder(2)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dsh.png`" />
<image src="@/static/images/dsh.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text>
</view>
<text>待收货</text>
</view>
<view @click="goMyOrder(3)" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/dpj.png`" />
<image src="@/static/images/dpj.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.evaluatedCount > 0">{{ userInfo.orderStatusNum.evaluatedCount }}</text>
</view>
<text>待评价</text>
</view>
<view @click="goReturnList()" class="item">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/sh.png`" />
<image src="@/static/images/sh.png" />
<text class="order-status-num" v-if="userInfo.orderStatusNum.refundCount > 0">{{ userInfo.orderStatusNum.refundCount }}</text>
</view>
<text>售后/退款</text>
</view>
</view>
</view>
<view class="myService">
<view class="serviceList acea-row row-middle">
<view class="title">我的管理</view>
<view class="serviceList acea-row row-between">
<template v-for="(item, MyMenusIndex) in MyMenus">
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)">
<view class="item acea-row row-between-wrapper" :key="MyMenusIndex" @click="goPages(item)">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view class="cell">{{ item.name }}</view>
<text class="iconfont icon-jiantou"></text>
<view class="">
<view class="cell">{{ item.name }}</view>
<view class="enName">{{ item.enName }}</view>
</view>
<!-- <text class="iconfont icon-jiantou"></text> -->
</view>
</template>
</view>
</view>
<view class="myService" v-if="$store.getters.token || userInfo.uid">
<view class="title">我的服务</view>
<view class="serviceList acea-row row-between">
<template v-for="(item, MyMenusIndex) in MyMenus2">
<view class="item acea-row row-between-wrapper" :key="MyMenusIndex" @click="goPages(item)">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view class="">
<view class="cell">{{ item.name }}</view>
<view class="enName">{{ item.enName }}</view>
</view>
<button class="contact" v-if="item.name == '联系客服'" hover-class="none" @click="contact"></button>
<!-- <button class="contact" v-if="item.name == '联系客服'" open-type="contact" hover-class="none" bindcontact="handleContact"></button> -->
</view>
</template>
</view>
</view>
</view>
<view class="by">
<!-- <view class="by">
<view>
<!-- <text class="by-text">技术支持</text> -->
<text class="by-text">技术支持</text>
</view>
</view>
</view> -->
<!-- <SwitchWindow
v-on:changeswitch="changeswitch"
:switchActive="switchActive"
:login_type="userInfo.login_type"
></SwitchWindow>-->
</view>
<Authorization v-else />
<!-- <Authorization v-else /> -->
<Tabbar :pagePath="pagePath"></Tabbar>
</view>
</template>
<script>
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import { getUserInfo, getMenuUser, wxappAuth, bindingPhone, wxappBindingPhone, wxappGetUserInfo } from '@/api/user'
import { isWeixin, VUE_APP_RESOURCES_URL, parseQuery, getProvider } from '@/utils'
import { login, isWeixin, VUE_APP_RESOURCES_URL, parseQuery, getProvider } from '@/utils'
import SwitchWindow from '@/components/SwitchWindow'
import Authorization from '@/pages/authorization/index'
import cookie from '@/utils/store/cookie'
import Tabbar from '@/components/Tabbar';
// import Authorization from '@/pages/authorization/index'
import dayjs from 'dayjs';
import cookie from '@/utils/store/cookie';
import store from '@/store';
const NAME = 'User'
@ -144,22 +237,91 @@ export default {
name: NAME,
components: {
SwitchWindow,
Authorization,
// Authorization,
Tabbar
},
props: {},
data: function() {
return {
StatusBar: this.StatusBar,
pagePath: '',
canIUseGetUserProfile: false,
MyMenus: [],
MyMenus: [
{
name: "我的收藏",
enName: "MY FAVORITES",
pic: "../../../static/images/my-favorites.png",
uniapp_url: "/pages/shop/GoodsCollection/index"
},
// {
// name: "",
// enName: "EXCHANGE",
// pic: "../../../static/images/exchange.png",
// uniapp_url: "/pages/shop/IntegralList/index"
// },
{
name: "地址管理",
enName: "MY ADDRESS",
pic: "../../../static/images/my-address.png",
uniapp_url: "/pages/user/address/AddressManagement/index"
},
{
name: "常见问题",
enName: "Q&A",
pic: "../../../static/images/Q&A.png",
uniapp_url: "/pages/user/Problem/index"
},
{
name: "我的足迹",
enName: "HISTORY",
pic: "../../../static/images/history.png",
uniapp_url: "/pages/shop/GoodsFoot/index"
}
],
MyMenus2: [
{
name: "关于我们",
enName: "ABOUT US",
pic: "../../../static/images/about-us.png",
uniapp_url: "/pages/user/AboutUs/index"
},
{
name: "联系客服",
enName: "SERVICE",
pic: "../../../static/images/service.png",
uniapp_url: ""
}
],
switchActive: false,
isWeixin: false,
}
},
computed: mapGetters(['userInfo']),
onLoad() {
uni.hideTabBar();
let pages = getCurrentPages();
this.pagePath = '/' + pages[pages.length - 1].route;
if (wx.getUserProfile) {
this.canIUseGetUserProfile = true
}
},
watch: {
userInfo() {
// this.MenuUser()
},
},
onShow() {
if (this.$store.getters.token) {
//
// uni.showLoading({
// title: '',
// })
this.$store.dispatch('getUser', true)
// this.MenuUser()
this.isWeixin = isWeixin()
}
if(this.userInfo.integral === undefined) this.userInfo.integral = 0;
if(this.userInfo.couponCount === undefined) this.userInfo.couponCount = 0;
},
methods: {
...mapMutations(['updateAuthorizationPage']),
@ -177,25 +339,196 @@ export default {
},
})
},
goBindPhone() {
this.$yrouter.push('/pages/user/BindingPhone/index')
},
// goBindPhone() {
// this.$yrouter.push('/pages/user/BindingPhone/index')
// },
goVipCenter() {
this.$yrouter.push('/pages/user/UserVip/index')
},
goUserCoupon() {
this.$yrouter.push('/pages/user/coupon/UserCoupon/index')
},
goIntegral() {
this.$yrouter.push('/pages/user/signIn/Integral/index')
},
goUserPromotion() {
this.$yrouter.push('/pages/user/promotion/UserPromotion/index')
},
goUserAccount() {
this.$yrouter.push('/pages/user/UserAccount/index')
this.$yrouter.push('/pages/user/signIn/Sign/index');
// this.$yrouter.push('/pages/user/signIn/Integral/index')
},
// goUserPromotion() {
// this.$yrouter.push('/pages/user/promotion/UserPromotion/index')
// },
// goUserAccount() {
// this.$yrouter.push('/pages/user/UserAccount/index')
// },
goPersonalData() {
this.$yrouter.push('/pages/user/PersonalData/index')
if(this.$store.getters.token || this.userInfo.uid) {
this.$yrouter.push('/pages/user/PersonalData/index')
}
},
getPhoneNumber(e) {
//
phoneLogin(e) {
console.log('用户微信手机号登录')
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
console.log(e.mp.detail)
getProvider()
.then(provider => {
console.log('当前的环境商',provider)
if (!provider) {
reject()
}
let code = cookie.get('wxLoginCode');
if(code) {
uni.checkSession({
success: () => {
console.log('登录态未过期');
wxappAuth({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
code: code,
spread: cookie.get('spread'),
})
.then( res => {
console.log('登录成功,开始处理登录信息保存,并获取用户详情')
uni.hideLoading()
store.commit('login', res.data.token, dayjs(res.data.expires_time))
// store.dispatch('userInfo', true)
getUserInfo()
.then(user => {
console.log('获取用户信息成功')
uni.setStorageSync('uid', user.data.uid)
store.dispatch('setUserInfo', user.data)
this.$emit('success', this.$store.getters.token,"this.$store.getters.token")
})
.catch(error => {
console.log('获取用户信息失败')
})
})
.catch(error => {
console.log(error)
console.log('登录接口调用失败')
})
},
fail: () => {
console.log('登录态过期');
uni.login({
provider: provider,
success: async loginRes => {
console.log(loginRes)
cookie.set('wxLoginCode', loginRes.code)
wxappAuth({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
code: loginRes.code,
spread: cookie.get('spread'),
})
.then( res => {
console.log('登录成功,开始处理登录信息保存,并获取用户详情')
uni.hideLoading()
store.commit('login', res.data.token, dayjs(res.data.expires_time))
// store.dispatch('userInfo', true)
getUserInfo()
.then(user => {
console.log('获取用户信息成功')
uni.setStorageSync('uid', user.data.uid)
store.dispatch('setUserInfo', user.data)
this.$emit('success', this.$store.getters.token,"this.$store.getters.token")
})
.catch(error => {
console.log('获取用户信息失败')
})
})
.catch(error => {
console.log(error)
console.log('登录接口调用失败')
})
}
})
}
})
} else {
uni.login({
provider: 'weixin',
success: async loginRes => {
console.log(loginRes)
cookie.set('wxLoginCode', loginRes.code)
wxappAuth({
encryptedData: e.mp.detail.encryptedData,
iv: e.mp.detail.iv,
code: loginRes.code,
spread: cookie.get('spread'),
})
.then( res => {
console.log('登录成功,开始处理登录信息保存,并获取用户详情')
uni.hideLoading()
store.commit('login', res.data.token, dayjs(res.data.expires_time))
// store.dispatch('userInfo', true)
getUserInfo()
.then(user => {
console.log('获取用户信息成功')
uni.setStorageSync('uid', user.data.uid)
store.dispatch('setUserInfo', user.data)
this.$emit('success', this.$store.getters.token,"this.$store.getters.token")
})
.catch(error => {
console.log('获取用户信息失败')
})
})
.catch(error => {
console.log(error)
console.log('登录接口调用失败')
})
}
})
}
// uni
// uni.login({
// provider: provider,
// success: async loginRes => {
// console.log(loginRes)
// let code = loginRes.code // code
// cookie.set('wxLoginCode', loginRes.code)
// wxappAuth({
// encryptedData: e.mp.detail.encryptedData,
// iv: e.mp.detail.iv,
// code: code,
// spread: cookie.get('spread'),
// })
// .then( res => {
// console.log(',')
// uni.hideLoading()
// store.commit('login', res.data.token, dayjs(res.data.expires_time))
// store.dispatch('userInfo', true)
// getUserInfo()
// .then(user => {
// console.log('')
// uni.setStorageSync('uid', user.data.uid)
// store.dispatch('setUserInfo', user.data)
// this.$emit('success', this.$store.getters.token,"this.$store.getters.token")
// // this.$yrouter.reLaunch({
// // path: cookie.get('redirect').replace(/\ /g, ''),
// // })
// })
// .catch(error => {
// console.log('')
// })
// })
// .catch(error => {
// console.log(error)
// console.log('')
// })
// }
// })
})
.catch(err => {})
} else {
uni.showToast({
title: '已拒绝授权',
icon: 'none',
duration: 2000,
})
}
},
/* getPhoneNumber(e) {
//
if (e.mp.detail.errMsg == 'getPhoneNumber:ok') {
uni.showLoading({
@ -278,7 +611,7 @@ export default {
duration: 2000,
})
}
},
}, */
//
getUserInfo(data) {
if (data.detail.errMsg == 'getUserInfo:fail auth deny') {
@ -345,8 +678,9 @@ export default {
console.log(error)
})
},
goPages(index) {
let url = this.MyMenus[index].uniapp_url
goPages(item) {
if(!item.uniapp_url) return;
let url = item.uniapp_url
if (url === '/pages/user/promotion/UserPromotion/index' && this.userInfo.statu === 1) {
if (!this.userInfo.isPromoter) {
uni.showToast({
@ -377,7 +711,7 @@ export default {
}
this.$yrouter.push({
path: this.MyMenus[index].uniapp_url,
path: url,
})
},
goPages2() {
@ -390,22 +724,18 @@ export default {
},
})
},
},
watch: {
userInfo() {
this.MenuUser()
},
},
onShow() {
if (this.$store.getters.token) {
//
uni.showLoading({
title: '加载中',
})
this.$store.dispatch('getUser', true)
this.MenuUser()
this.isWeixin = isWeixin()
}
//
contact() {
wx.openCustomerServiceChat({
extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc3952c32f3d9b68c3'},
corpId: 'ww8bcef4602d97a76a',
success(res) {}
})
},
// handleContact (e) {
// // console.log(e.detail.path)
// // console.log(e.detail.query)
// },
},
onHide() {
console.log('离开用户中心')
@ -413,40 +743,182 @@ export default {
},
}
</script>
<style>
page {
background-color: #FFFFFF;
}
</style>
<style lang="less" scoped>
.user .bg {
width: 100vw;
height: 530rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
image {
width: 100%;
height: 100%;
}
}
.user .header {
.set-icon {
position: absolute;
bottom: 14rpx;
right: 24rpx;
width: 62rpx;
height: 62rpx;
}
.author-btn {
padding: 0;
width: auto;
height: auto;
border: 0 !important;
background-color: transparent;
}
button::after{
border: 0;
}
}
.user .vip-box {
margin: 0rpx 32rpx 10rpx;
padding-left: 10rpx;
padding-right: 20rpx;
width: 686rpx;
height: 76rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFangTC;
font-weight: 600;
color: #F5F6F8;
line-height: 34rpx;
image {
width: 36rpx;
height: 36rpx;
}
.more {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 26rpx;
.jiantou-right {
width: 0;
height: 0;
border-top: 6rpx solid transparent;
border-left: 10rpx solid #FFFFFF;
border-bottom: 6rpx solid transparent;
border-right: 0rpx solid transparent;
margin-left: 8rpx;
}
}
}
.user .user-info {
margin: 0rpx 32rpx 32rpx;
.coupon-box {
width: 290rpx;
height: 76rpx;
box-shadow: inset 0rpx 0rpx 10rpx 0rpx rgba(0,0,0,0.15);
border-radius: 16rpx;
padding-left: 16rpx;
padding-right: 12rpx;
.title {
font-size: 26rpx;
font-family: PingFangTC;
font-weight: 600;
color: #F5F6F8;
line-height: 34rpx;
}
.item {
width: 40rpx;
height: 56rpx;
margin-left: 6rpx;
position: relative;
.top {
width: 40rpx;
height: 26rpx;
background: #3A3A3C;
border-radius: 8rpx 8rpx 0rpx 0rpx;
}
.bottom {
width: 40rpx;
height: 26rpx;
background: #3A3A3C;
border-radius: 0rpx 0rpx 8rpx 8rpx;
}
.num {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 40rpx;
font-family: Futura;
font-weight: 600;
color: #F5F6F8;
line-height: 56rpx;
text-align: center;
}
}
}
.integral-box {
width: 384rpx;
height: 76rpx;
}
}
// .getUserBaseData {
// .userDataBtn {
// width: 80%;
// height: 80rpx;
// background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
// background: -moz-linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
// border-radius: 40rpx;
// font-size: 30rpx;
// font-family: PingFang SC;
// font-weight: 500;
// color: rgba(255, 255, 255, 1);
// }
// }
// .footer-line-height {
// height: 1 * 100rpx;
// }
<style lang="less">
.getUserBaseData {
.userDataBtn {
width: 80%;
height: 80rpx;
background: linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
background: -moz-linear-gradient(to right, #f35447 0%, #ff8e3c 100%);
border-radius: 40rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
}
}
.footer-line-height {
height: 1 * 100rpx;
}
.order-status-num {
min-width: 0.33 * 100rpx;
background-color: #fff;
color: #eb3729;
border-radius: 15px;
position: absolute;
right: -0.14 * 100rpx;
top: -0.15 * 100rpx;
font-size: 0.2 * 100rpx;
padding: 0 0.08 * 100rpx;
border: 1px solid #eb3729;
.orderState .pictrue {
position: relative;
.order-status-num {
// min-width: 20rpx;
background-color: #F1F1F1;
font-size: 16rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 20rpx;
color: #2DB5AE;
border-radius: 12rpx;
position: absolute;
right: -2rpx;
top: -2rpx;
padding: 0 6rpx;
border: 2rpx solid #2DB5AE;
}
}
.pictrue {
position: relative;
.serviceList .item {
position: relative;
.contact {
width: 332rpx;
height: 142rpx;
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
}
.switch-h5 {
@ -465,13 +937,13 @@ export default {
color: #ffffff;
}
.by {
text-align: center;
padding: 30rpx 0;
}
// .by {
// text-align: center;
// padding: 30rpx 0;
// }
.by-text {
text-align: center;
font-size: 24rpx;
}
// .by-text {
// text-align: center;
// font-size: 24rpx;
// }
</style>

288
pages/user/UserVip/index.vue

@ -1,12 +1,54 @@
<template>
<view class="member-center">
<view class="header">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">会员中心</view>
</block>
</cu-custom>
</view>
<view class="vip-info-box">
<view class="vip-box">
<!-- <image class="bg" src="@/static/images/vip-card.png" mode=""></image> -->
<image class="bg" :src="vipList[activeIndex].image" mode=""></image>
<view class="info-box">
<view class="user-info acea-row">
<view class="headImg">
<image class="image" v-if="userInfo.avatar" :src="userInfo.avatar" mode=""></image>
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="@/static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
</view>
<view class="">
<view class="user-name">{{ userInfo.nickname || '微信用户' }}</view>
<view class="">账号{{ userInfo.phone || userInfo.uid }}</view>
</view>
</view>
<view class="progress-bar-box">
<view class="progress-bar" :style="'width:'+ (growthPercent || 0) +'%;'"></view>
</view>
<view class="acea-row">
<!-- <view class="vip-icon"></view> -->
<image class="vip-icon" :src="vipList[activeIndex].icon" mode=""></image>
<view class="to-next-level">下一等级还需成长值 {{userInfo.growth}}/{{vipList[activeIndex+1].growthValue}}</view>
</view>
</view>
</view>
</view>
<!-- <view class="header">
<view class="slider-banner banner">
<swiper indicatorDots="true" @change="swiperChange">
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
<swiper-item>
<view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <image :src="item.icon" />-->
<image :src="item.icon" />
<view class="name">{{ item.name }}</view>
<view class="discount">
可享受商品折扣: {{ item.discount / 10 }}
@ -29,18 +71,46 @@
</block>
</swiper>
</view>
</view>
<view class="wrapper">
<view class="title acea-row row-between-wrapper">
<view>
</view> -->
<view class="wrapper" :style="'min-height:calc(100vh - '+ topHeight +'px)'">
<view class="title">
会员权益
<!-- <view>
<text class="iconfont icon-jingyanzhi"></text>会员升级要求
</view>
<view class="num">
<text class="current">{{ taskCount }}</text>
/{{ vipRequire.length }}
</view>
</view> -->
</view>
<view class="list">
<view class="vip-rights acea-row row-around">
<view class="rights-item">
<image src="../../../static/images/vip-rights1.png" mode=""></image>
<view class="text">专属优惠</view>
</view>
<view class="rights-item">
<image src="../../../static/images/vip-rights2.png" mode=""></image>
<view class="text">会员券</view>
</view>
<view class="rights-item">
<image src="../../../static/images/vip-rights3.png" mode=""></image>
<view class="text">专属管家</view>
</view>
<view class="rights-item">
<image src="../../../static/images/vip-rights4.png" mode=""></image>
<view class="text">积分回馈</view>
</view>
</view>
<view class="info-box">
<view class="info-title">权益说明</view>
<view class="" v-html="vipList[activeIndex].benefit"></view>
</view>
<view class="info-box">
<view class="info-title">会员规则说明</view>
<view class="" v-html="vipList[activeIndex].explain"></view>
</view>
<!-- <view class="list">
<view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<view class="top acea-row row-between-wrapper">
<view class="name">
@ -60,34 +130,41 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
<Recommend></Recommend>
<view class="growthValue" :class="growthValue === false ? 'on' : ''">
<!-- <Recommend></Recommend> -->
<!-- <view class="growthValue" :class="growthValue === false ? 'on' : ''">
<view class="pictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/value.jpg`" />
<text class="iconfont icon-guanbi3" @click="growthTap"></text>
</view>
<view class="conter">{{ illustrate }}</view>
</view>
<view class="mask" :hidden="growthValue" @click="growthTap"></view>
<view class="mask" :hidden="growthValue" @click="growthTap"></view> -->
</view>
</template>
<script>
import { mapGetters } from 'vuex'
import {
div,
mul
} from "@/utils/bc";
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import Recommend from "@/components/Recommend";
import { getVipInfo, getVipTask, setDetection } from "@/api/user";
// import Recommend from "@/components/Recommend";
import { getVipInfo, getVipTask, setDetection,getVipInformation} from "@/api/user";
export default {
name: "Poster",
components: {
// swiper,
// swiperSlide,
Recommend
// Recommend
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
topHeight: 0,
vipList: [], //
vipRequire: [], //
vipComplete: [], //
@ -112,7 +189,10 @@ export default {
loading: false,
growthValue: true,
illustrate: "",
activeIndex: 0
activeIndex: 0,
growthPercent: 0,
userLevel:0,//
userGrowth:0//
};
},
watch: {
@ -130,11 +210,14 @@ export default {
}
},
computed: {
swiper() {
// return this.$refs.mySwiper.swiper;
}
...mapGetters(['userInfo']),
// swiper() {
// // return this.$refs.mySwiper.swiper;
// }
},
mounted: function() {
this.getVipMation()
this.topHeight = this.CustomBar + 188;
let that = this;
setDetection();
that.getInfo();
@ -145,6 +228,7 @@ export default {
},
methods: {
swiperChange: function(e) {
let that = this;
that.activeIndex = e.mp.detail.current;
@ -161,6 +245,13 @@ export default {
that.vipRequire = res.data.task.list;
that.vipComplete = res.data.task.task;
that.taskCount = res.data.task.reachCount;
that.vipList.forEach((val, index) => {
val.benefit = val.benefit.replace(/\n/g,"<br/>"); // /\r/g
val.explain = val.explain.replace(/\n/g,"<br/>"); // /\r/g
if (val.isClear === false) {
this.growthPercent = mul(div(this.userGrowth, this.vipList[index+1].growthValue), 100);
}
})
},
err => {
uni.showToast({
@ -172,6 +263,12 @@ export default {
}
);
},
getVipMation(){
getVipInformation().then(res=>{
this.userLevel=res.data.level
this.userGrowth=res.data.growth
})
},
getTask: function() {
let that = this;
getVipTask(that.vipList[that.activeIndex].id).then(
@ -198,11 +295,150 @@ export default {
};
</script>
<style lang="less">
.banner swiper {
height: 328rpx;
}
.swiper-slide {
margin: 0 auto;
}
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.vip-info-box {
padding: 6rpx 18rpx;
.vip-box {
width: 100%;
height: 364rpx;
position: relative;
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.info-box {
padding: 180rpx 38rpx 0rpx;
.user-info {
padding-bottom: 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 32rpx;
.headImg {
width: 76rpx;
height: 76rpx;
box-shadow: 0rpx 0rpx 20rpx 10rpx rgba(0,0,0,0.08);
padding: 4rpx;
background-color: linear-gradient(135deg, rgba(27, 141, 204, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
margin-right: 12rpx;
.image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.noAvatar {
width: 100%;
height: 100%;
border-radius: 50%;
background: #F1F1F1;
image {
width: 90%;
}
}
}
.user-name {
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
}
}
.progress-bar-box {
width: 642rpx;
height: 8rpx;
background: #39D396;
border-radius: 4rpx;
margin-bottom: 14rpx;
.progress-bar {
// width: 330rpx;
height: 8rpx;
background: #1B8DCC;
border-radius: 4rpx;
}
}
.vip-icon {
width: 80rpx;
height: 26rpx;
// background-color: #FFFFFF;
}
.to-next-level {
padding-left: 10rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 26rpx;
}
}
}
}
.vip-rights {
padding: 6rpx 0rpx 20rpx;
.rights-item {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 30rpx;
text-align: center;
image {
width: 76rpx;
height: 76rpx;
margin-bottom: 10rpx;
}
}
}
.member-center .wrapper .info-box {
padding: 20rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 32rpx;
.info-title {
font-size: 30rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 46rpx;
padding-bottom: 16rpx;
}
}
// .banner swiper {
// height: 328rpx;
// }
// .swiper-slide {
// margin: 0 auto;
// }
</style>

125
pages/user/address/AddAddress/index.vue

@ -1,5 +1,18 @@
<template>
<view class="addAddress absolute">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">新增收货地址</view>
</block>
</cu-custom>
</view>
<view class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">姓名</view>
@ -11,33 +24,44 @@
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">所在地区</view>
<view class="picker acea-row row-between-wrapper select-value form-control">
<view class="address">
<view class="picker">
<!-- <view class="picker acea-row row-between-wrapper select-value form-control"> -->
<!-- <view class="address"> -->
<CitySelect ref="cityselect" :defaultValue="defaultAddress" @callback="result" :items="district"></CitySelect>
</view>
<view class="iconfont icon-dizhi font-color-red"></view>
<!-- </view> -->
<!-- <view class="iconfont icon-dizhi font-color-red"></view> -->
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">详细地址</view>
<input type="text" placeholder="请填写具体地址" v-model="userAddress.detail" required />
<view class="item acea-row">
<view class="name" style="margin-top: 12rpx;">详细地址</view>
<textarea v-model="userAddress.detail" placeholder="如街道、社区、小区、门牌号" placeholder-style="color: #999999;font-weight:450;line-height:38rpx;" required />
<!-- <input type="text" placeholder="如街道、社区、小区、门牌号" v-model="userAddress.detail" required /> -->
</view>
</view>
<view class="default acea-row row-middle">
<view class="select-btn">
<view class="checkbox-wrapper">
<view class="acea-row row-between-wrapper">
<text>地址标签</text>
<view class="tag-box acea-row">
<view :class="tagType == '1'?'on':''" @click="changeTag('1')"></view>
<view :class="tagType == '2'?'on':''" @click="changeTag('2')">学校</view>
<view :class="tagType == '3'?'on':''" @click="changeTag('3')">公司</view>
</view>
</view>
<!-- <view class="select-btn"> -->
<view class="checkbox-wrapper acea-row row-between-wrapper">
<text class="def">设为默认</text>
<checkbox-group @change="ChangeIsDefault">
<label class="well-check">
<checkbox :value="userAddress.isDefault == 1 ? 'checked' : ''" :checked="userAddress.isDefault ? true : false"></checkbox>
<text class="def">设置为默认地址</text>
</label>
<!-- <label class="well-check"> -->
<checkbox :value="userAddress.isDefault == 1 ? 'checked' : ''" :checked="userAddress.isDefault ? true : false"></checkbox>
<!-- </label> -->
</checkbox-group>
</view>
</view>
<!-- </view> -->
</view>
<view></view>
<view class="keepBnt bg-color-red" @tap="submit">立即保存</view>
<view class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</view>
<view class="keepBnt" @tap="submit">立即保存</view>
<view class="keepBnt" style="background:#D8D8D8;color:#999999;" @click="cancel">取消</view>
<!-- <view class="wechatAddress" v-if="isWechat && !id" @click="getAddress">导入微信地址</view> -->
</view>
</template>
@ -63,6 +87,7 @@ export default {
isWechat: isWeixin(),
defaultAddress: {},
addressText: '',
tagType: '',
}
},
mounted: function() {
@ -114,6 +139,13 @@ export default {
that.address.district = res.data.district
})
},
changeTag(type) {
if(this.tagType == type) {
this.tagType = '';
} else {
this.tagType = type;
}
},
getAddress() {},
async submit() {
let name = this.userAddress.realName,
@ -174,6 +206,9 @@ export default {
})
}
},
cancel() {
this.$yrouter.back();
},
ChangeIsDefault: function() {
this.userAddress.isDefault = !this.userAddress.isDefault
},
@ -194,11 +229,65 @@ export default {
}
</script>
<style lang="less">
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.address {
text {
width: 100%;
display: block;
}
}
.addAddress .list .item textarea {
width: 506rpx;
height: 144rpx;
font-size: 26rpx;
line-height: 38rpx;
background: #F1F1F1;
border-radius: 16rpx;
padding: 12rpx;
}
.addAddress .tag-box {
width: 530rpx;
padding-left: 26rpx;
view {
padding: 0rpx 24rpx;
height: 62rpx;
background: #F1F1F1;
border-radius: 16rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
line-height: 62rpx;
margin-right: 20rpx;
}
.on {
background: #2DB5AE;
color: #FFFFFF;
}
}
.addAddress .default .checkbox-wrapper {
padding-top: 30rpx;
width: 100%;
}
</style>

424
pages/user/address/AddressManagement/index.vue

@ -1,81 +1,94 @@
<template>
<view
class="address-management"
:class="addressList.length < 1 && page > 1 ? 'on' : ''"
ref="container"
>
<view class="line" v-if="addressList.length > 0">
<view class="address-management" ref="container" >
<!-- :class="addressList.length < 1 && page > 1 ? 'on' : ''" -->
<!-- <view class="line" v-if="addressList.length > 0">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/line.jpg`" />
</view> -->
<view class="header" :style="'height: ' + CustomBar + 'px'">
<view class="top-nav-box acea-row row-between-wrapper" :style="'width:' + CustomBarLeft + 'px;padding-top:' + StatusBar + 'px;height:' + CustomBar + 'px'">
<image @click="back" class="backImg" src="@/static/images/back-btn.png" mode=""></image>
<view class="tab-title">地址管理</view>
<image class="addAddress" src="@/static/images/add-addr.png" @click="addAddress" v-if="addressList.length"></image>
</view>
</view>
<view :style="[{height:CustomBar + 'px'}]"></view>
<view class="" style="padding-top: 10rpx;">
<view class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex" :data-index="addressListIndex" @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="{ right: item.right + 'rpx' || '0rpx' }">
<view class="info-box acea-row row-between-wrapper">
<view class="">
<view class="">{{ item.province }}{{ item.city }}{{ item.district}}</view>
<view class="detail">{{ item.detail }}</view>
<view class="user-info acea-row row-middle">
<view class="">{{ item.realName }}</view>
<view class="phone">{{ item.phone }}</view>
<view v-if="item.isDefault == 1" class="default-tip">默认</view>
</view>
</view>
<image class="edit" src="../../../../static/images/edit-icon.png" @click.stop="editAddress(addressListIndex)" mode=""></image>
</view>
<view class="btn-box acea-row" :style="item.right?'right: -428rpx;':''">
<view class="default-btn" @click="radioChange(item.id)">{{item.isDefault != 1?'设为':'取消'}}默认</view>
<view class="del-btn">删除</view>
</view>
<!-- <view class="address">
<view class="consignee">
收货人{{ item.realName }}
<text class="phone">{{ item.phone }}</text>
</view>
<view>
收货地址{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)">
<label class="well-check">
<checkbox :value="item.isDefault==1?'checked':''" :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<text class="default">设为默认</text>
</label>
</checkbox-group>
</view>
</view>
<view class="acea-row row-middle">
<view @click="editAddress(addressListIndex)">
<text class="iconfont icon-bianji"></text>编辑
</view>
<view @click="delAddress(addressListIndex)">
<text class="iconfont icon-shanchu"></text>删除
</view>
</view>
</view> -->
</view>
</view>
<Loading :loaded="loadend" :loading="loading" v-if="addressList.length > 0"></Loading>
<view class="no-address" v-if="addressList.length < 1 && page > 1">
<!-- <view class="noCommodity"> -->
<image class="image" src="../../../../static/images/no-address.png" mode="widthFix"></image>
<view class="">等我们也造火箭或许能寄到火星</view>
<view class="tip">赶快添加收货地址吧</view>
<view class="add-icon" @click="addAddress"></view>
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/noAddress.png`" class="image" /> -->
</view>
<view class="item" v-for="(item, addressListIndex) in addressList" :key="addressListIndex">
<view class="address">
<view class="consignee">
收货人{{ item.realName }}
<text class="phone">{{ item.phone }}</text>
</view>
<view>
收货地址{{ item.province }}{{ item.city }}{{ item.district
}}{{ item.detail }}
</view>
</view>
<view class="operation acea-row row-between-wrapper">
<view class="select-btn">
<view class="checkbox-wrapper">
<checkbox-group @change="radioChange(item.id)">
<label class="well-check">
<checkbox :value="item.isDefault==1?'checked':''" :checked="item.isDefault||item.isDefault=='1' ? true : false"></checkbox>
<text class="default">设为默认</text>
</label>
</checkbox-group>
<!-- <label class="well-check">
<input
type="radio"
name="default"
value
:checked="item.isDefault ? true : false"
@click="radioChange(addressListIndex)"
/>
<i class="icon"></i>
<text class="default">设为默认</text>
</label>-->
</view>
</view>
<view class="acea-row row-middle">
<view @click="editAddress(addressListIndex)">
<text class="iconfont icon-bianji"></text>编辑
</view>
<view @click="delAddress(addressListIndex)">
<text class="iconfont icon-shanchu"></text>删除
</view>
</view>
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<view class="noCommodity" v-if="addressList.length < 1 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noAddress.png`" class="image" />
</view>
</view>
<view style="height:100rpx;"></view>
<view class="footer acea-row row-between-wrapper">
<!-- <view style="height:100rpx;"></view> -->
<!-- <view class="footer acea-row row-between-wrapper">
<view class="addressBnt bg-color-red" v-if="isWechat" @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<view class="addressBnt on bg-color-red" v-else @click="addAddress">
<text class="iconfont icon-tianjiadizhi"></text>添加新地址
</view>
<!--<view class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">-->
<!--<text class="iconfont icon-weixin2"></text>导入微信地址-->
<!--</view>-->
</view>
<view class="addressBnt wxbnt" v-if="isWechat" @click="getAddress">
<text class="iconfont icon-weixin2"></text>导入微信地址
</view>
</view> -->
</view>
</template>
<style scoped lang="less">
.address-management.on {
background-color: #fff;
height: 100vh;
}
</style>
<script type="text/babel">
import {
getAddressList,
@ -93,13 +106,20 @@ export default {
},
data() {
return {
StatusBar: this.StatusBar,
CustomBar: this.CustomBar,
CustomBarLeft: this.CustomBarLeft,
// addBottom: this.addBottom,
page: 1,
limit: 20,
addressList: [],
loadTitle: "",
loading: false,
loadend: false,
isWechat: isWeixin()
isWechat: isWeixin(),
right : 0,
delBtnWidth: 462,
startX : 0
};
},
mounted: function() {
@ -111,7 +131,51 @@ export default {
onShow: function() {
this.refresh();
},
watch:{
},
methods: {
back() {
uni.navigateBack({
delta: 1,
fail: (err) => {
uni.switchTab({
url: '/pages/home/index',
})
}
})
},
drawStart(e) {
var touch = e.touches[0];
console.log(touch, "drawStart")
for (var index in this.addressList) {
this.addressList[index].right = 0;
}
this.startX = touch.clientX;
},
drawMove(e) {
let touch = e.touches[0];
let index = e.currentTarget.dataset.index;
let disX = this.startX - touch.clientX;
if (disX >= 20) {
if (disX > this.delBtnWidth) {
disX = this.delBtnWidth;
}
this.addressList[index].right = disX;
} else {
this.addressList[index].right = 0;
}
// console.log(index, this.addressList[index].right, "drawMove")
},
drawEnd(e) {
let index = e.currentTarget.dataset.index;
console.log(index, this.addressList[e.currentTarget.dataset.index].right, "drawMove")
let item = this.addressList[index];
if (item.right >= 120) {
this.addressList[index].right = this.delBtnWidth;
} else {
this.addressList[index].right = 0;
}
},
refresh: function() {
this.addressList = [];
this.page = 1;
@ -129,8 +193,13 @@ export default {
that.loading = true;
getAddressList({ page: that.page, limit: that.limit }).then(res => {
that.loading = false;
var arr = [];
for(var i in res.data){
res.data[i].right = 0;
arr.push(res.data[i])
};
//apply();js;
that.addressList.push.apply(that.addressList, res.data);
that.addressList.push.apply(that.addressList, arr);
that.loadend = res.data.length < that.limit; //
that.page = that.page + 1;
});
@ -180,44 +249,185 @@ export default {
path: "/pages/user/address/AddAddress/index"
});
},
getAddress() {
// openAddress().then(userInfo => {
// uni.showLoading({ title: "" });
// postAddress({
// real_name: userInfo.userName,
// phone: userInfo.telNumber,
// address: {
// province: userInfo.provinceName,
// city: userInfo.cityName,
// district: userInfo.countryName
// },
// detail: userInfo.detailInfo,
// post_code: userInfo.postalCode,
// wx_export: 1
// })
// .then(() => {
// this.page = 1;
// this.loading = false;
// this.loadend = false;
// this.addressList = [];
// this.AddressList();
// uni.hideLoading();
// uni.showToast({
// title: "",
// icon: 'success',
// duration: 2000
// });
// })
// .catch(err => {
// uni.hideLoading();
// uni.showToast({
// title: err.msg || err.response.data.msg|| err.response.data.message,
// icon: 'none',
// duration: 2000
// });
// });
// });
}
// getAddress() {
// openAddress().then(userInfo => {
// uni.showLoading({ title: "" });
// postAddress({
// real_name: userInfo.userName,
// phone: userInfo.telNumber,
// address: {
// province: userInfo.provinceName,
// city: userInfo.cityName,
// district: userInfo.countryName
// },
// detail: userInfo.detailInfo,
// post_code: userInfo.postalCode,
// wx_export: 1
// })
// .then(() => {
// this.page = 1;
// this.loading = false;
// this.loadend = false;
// this.addressList = [];
// this.AddressList();
// uni.hideLoading();
// uni.showToast({
// title: "",
// icon: 'success',
// duration: 2000
// });
// })
// .catch(err => {
// uni.hideLoading();
// uni.showToast({
// title: err.msg || err.response.data.msg|| err.response.data.message,
// icon: 'none',
// duration: 2000
// });
// });
// });
// }
}
};
</script>
<style lang="less" scoped>
// .address-management.on {
// background-color: #fff;
// height: 100vh;
// }
// .address-management {
// width: 100%;
// padding-top: 20rpx;
// }
.header {
position: fixed;
left: 0;
top: 0;
z-index: 100;
background: #F1F1F1;
width: 750rpx;
.backImg {
height: 62rpx;
width: 62rpx;
margin-left: 26rpx;
}
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.addAddress {
height: 62rpx;
width: 62rpx;
margin-right: 14rpx;
}
}
.info-box {
width: 686rpx;
height: 156rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
padding: 24rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
.detail {
font-size: 26rpx;
font-weight: 600;
line-height: 38rpx;
padding: 6rpx 0rpx;
}
.user-info {
font-size: 24rpx;
line-height: 32rpx;
.phone {
padding-left: 20rpx;
padding-right: 24rpx;
}
.default-tip {
width: 58rpx;
height: 26rpx;
border-radius: 16rpx;
border: 2rpx solid #2EB5AE;
font-size: 18rpx;
color: #2DB5AE;
line-height: 22rpx;
text-align: center;
}
}
.edit {
width: 46rpx;
height: 46rpx;
}
}
.btn-box {
position: absolute;
top: 0;
right: -472rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 156rpx;
text-shadow: 0rpx 10rpx 16rpx rgba(0,0,0,0.15);
text-align: center;
.default-btn {
width: 308rpx;
height: 156rpx;
background: #2DB5AE;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
}
.del-btn {
width: 154rpx;
height: 156rpx;
background: #EC3A5B;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
}
}
.no-address {
padding-top: 168rpx;
font-size: 34rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 48rpx;
text-align: center;
.image {
width: 430rpx;
margin: 0rpx auto 74rpx;
}
.tip {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3A3A3C;
line-height: 19px;
margin-bottom: 76rpx;
}
.add-icon {
width: 108rpx;
height: 108rpx;
border: 4rpx solid #2DB5AE;
border-radius: 50%;
margin: 0rpx auto;
font-size: 64rpx;
color: #2DB5AE;
line-height: 100rpx;
text-align: center;
font-weight: 400;
}
}
</style>

582
pages/user/coupon/GetCoupon/index.vue

@ -1,7 +1,69 @@
<template>
<view ref="container">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/banner_coupon.png`" mode="widthFix" class="tui-coupon-banner"></image>
<view class="tui-coupon-list">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">领券中心</view>
</block>
</cu-custom>
</view>
<view class="banner-box">
<swiper class="swiper-wrapper" @change="handleChange" :autoplay="true">
<block v-for="(item, imgUrlsIndex) in imgUrls" :key="imgUrlsIndex" >
<swiper-item @click="goBannerDetail">
<!-- <view class="image">{{item}}</view> -->
<image class="image" :src="item.pic" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
<view class="dots-box acea-row row-center">
<view class="dot" v-for="(item,index) in imgUrls" :key="index">
<view :class="(currents > index?'active2 ':'active ') + (currents == index?'on':(currents-1 == index?'on2':''))"></view>
</view>
</view>
</view>
<view class="coupon-list">
<view class="item acea-row row-between" v-cloak v-for="(item, index) in couponsList" :key="index">
<image class="coupon-bg" src="@/static/images/coupon-bg.png" mode=""></image>
<view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box">
<view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">¥{{ item.couponPrice }}</view> -->
<!-- <view class="money">7<text></text></view> -->
<view class="line"></view>
<view class="tip acea-row row-middle row-between">
<!-- <view class="">{{item.ctype?'仅限定品牌可用':'全部商品可用'}}</view> -->
<view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view>
<view v-else>{{ item.startTime }}-{{ item.endTime }}</view>
</view>
</view>
</view>
<view class="coupon-right acea-row row-center-column">
<image v-if="item.isUse === true" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""></image>
<view class="type">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view class="tip">{{ item.useMinPrice }}可用</view>
<!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> -->
<view v-if="item.isUse === true" class="btn btn-white" @click="goBrands">去使用</view>
<view v-else-if="item.isUse === 2" class="btn btn-fail">已领完</view>
<view v-else class="btn" @click="getCoupon(item.id, index)">立刻领取</view>
</view>
</view>
</view>
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/banner_coupon.png`" mode="widthFix" class="tui-coupon-banner"></image> -->
<!-- <view class="tui-coupon-list">
<view class="tui-coupon-item tui-top20" v-for="(item, index) in couponsList" :key="index">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/bg_coupon_3x.png`" class="tui-coupon-bg" mode="widthFix"></image>
<view class="tui-coupon-item-left">
@ -27,7 +89,7 @@
<view class="tui-rule-box">
<view class="tui-coupon-circle"></view>
<view class="tui-coupon-text" v-if="item.endTime !== 0">{{ item.endTime }} 到期</view>
<!-- <view class="tui-coupon-text" v-if="item.endTime !== 0">{{ item.startTime }} - {{ item.endTime }}</view> -->
<view class="tui-coupon-text" v-if="item.endTime !== 0">{{ item.startTime }} - {{ item.endTime }}</view>
<view class="tui-coupon-text" v-else>不限时</view>
</view>
</view>
@ -39,19 +101,20 @@
<tui-button type="danger" width="152rpx" height="52rpx" :size="24" shape="circle" v-else @click="getCoupon(item.id, index)">立即领取</tui-button>
</view>
</view>
</view>
</view> -->
<Loading :loaded="loadend" :loading="loading"></Loading>
<!--暂无优惠券-->
<view class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<!-- <view class="noCommodity" v-if="couponsList.length === 0 && page > 1">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCoupon.png`" class="image" />
</view>
</view>
</view> -->
</view>
</template>
<script>
import { getCoupon, getCouponReceive } from '@/api/user'
import { getBanner} from '@/api/store';
import Loading from '@/components/Loading'
import DataFormatT from '@/components/DataFormatT'
export default {
@ -63,39 +126,66 @@ export default {
props: {},
data: function() {
return {
currents: 0,
page: 1,
limit: 10,
couponsList: [],
loading: false,
loadend: false,
imgUrls:[]
}
},
mounted: function() {
this.getUseCoupons()
getBanner(2).then(
res => {
this.$set(this,'imgUrls',res.data.banner)
})
},
onReachBottom() {
!this.loading && this.getUseCoupons()
},
methods: {
goBrands: function() {
this.$yrouter.push({
path: '/pages/shop/brands/index',
})
},
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
handleChange(e) {
this.currents = e.mp.detail.current;
},
getCoupon: function(id, index) {
let that = this
let list = that.couponsList
getCouponReceive(id)
.then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
})
.catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons() {
if (this.loading) return //false
@ -115,205 +205,305 @@ export default {
</script>
<style lang="less" scoped>
page {
background-color: #f5f5f5;
}
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.banner-box {
padding: 20rpx 32rpx;
.swiper-wrapper {
width: 686rpx;
height: 242rpx;
border-radius: 16rpx;
.image {
width: 686rpx;
height: 242rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
}
}
.dots-box {
padding-top: 26rpx;
.dot {
width: 92rpx;
height: 4rpx;
background: #CCEDEB;
margin: 0rpx 6rpx;
position: relative;
.active {
width: 0rpx;
height: 4rpx;
background: #2DB5AE;
position: absolute;
top: 0;
left: 0;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active2 {
width: 0rpx;
height: 4rpx;
background: #2DB5AE;
position: absolute;
top: 0;
left: 92rpx;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active.on {
width: 92rpx;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
.active.on2 {
width: 92rpx;
left: 0;
transition: all .6s cubic-bezier(.18,.89,.17,.88);
-webkit-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-moz-transition: all .6s cubic-bezier(.18,.89,.17,.88);
-o-transition: all .6s cubic-bezier(.18,.89,.17,.88);
}
}
}
}
// page {
// background-color: #f5f5f5;
// }
.container {
padding-bottom: env(safe-area-inset-bottom);
}
// .container {
// padding-bottom: env(safe-area-inset-bottom);
// }
.tui-coupon-list {
width: 100%;
padding: 0 25rpx;
box-sizing: border-box;
}
// .tui-coupon-list {
// width: 100%;
// padding: 0 25rpx;
// box-sizing: border-box;
// }
.tui-coupon-banner {
width: 100%;
}
// .tui-coupon-banner {
// width: 100%;
// }
.tui-coupon-item {
width: 100%;
height: 210rpx;
position: relative;
display: flex;
align-items: center;
padding-right: 30rpx;
box-sizing: border-box;
overflow: hidden;
}
// .tui-coupon-item {
// width: 100%;
// height: 210rpx;
// position: relative;
// display: flex;
// align-items: center;
// padding-right: 30rpx;
// box-sizing: border-box;
// overflow: hidden;
// }
.tui-coupon-bg {
width: 100%;
height: 210rpx;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
// .tui-coupon-bg {
// width: 100%;
// height: 210rpx;
// position: absolute;
// left: 0;
// top: 0;
// z-index: 1;
// }
.tui-coupon-sign {
height: 110rpx;
width: 110rpx;
position: absolute;
z-index: 9;
top: -30rpx;
right: 40rpx;
}
// .tui-coupon-sign {
// height: 110rpx;
// width: 110rpx;
// position: absolute;
// z-index: 9;
// top: -30rpx;
// right: 40rpx;
// }
.tui-coupon-item-left {
width: 218rpx;
height: 210rpx;
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
flex-shrink: 0;
}
// .tui-coupon-item-left {
// width: 218rpx;
// height: 210rpx;
// position: relative;
// z-index: 2;
// display: flex;
// align-items: center;
// justify-content: center;
// flex-direction: column;
// flex-shrink: 0;
// }
.tui-coupon-price-box {
display: flex;
color: #e41f19;
align-items: flex-end;
}
// .tui-coupon-price-box {
// display: flex;
// color: #e41f19;
// align-items: flex-end;
// }
.tui-coupon-price-sign {
font-size: 30rpx;
}
// .tui-coupon-price-sign {
// font-size: 30rpx;
// }
.tui-coupon-price {
font-size: 70rpx;
line-height: 68rpx;
font-weight: bold;
}
// .tui-coupon-price {
// font-size: 70rpx;
// line-height: 68rpx;
// font-weight: bold;
// }
.tui-price-small {
font-size: 58rpx !important;
line-height: 56rpx !important;
}
// .tui-price-small {
// font-size: 58rpx !important;
// line-height: 56rpx !important;
// }
.tui-coupon-intro {
background: #f7f7f7;
padding: 8rpx 10rpx;
font-size: 26rpx;
line-height: 26rpx;
font-weight: 400;
color: #666;
margin-top: 18rpx;
}
// .tui-coupon-intro {
// background: #f7f7f7;
// padding: 8rpx 10rpx;
// font-size: 26rpx;
// line-height: 26rpx;
// font-weight: 400;
// color: #666;
// margin-top: 18rpx;
// }
.tui-coupon-item-right {
flex: 1;
height: 210rpx;
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 24rpx;
box-sizing: border-box;
overflow: hidden;
}
// .tui-coupon-item-right {
// flex: 1;
// height: 210rpx;
// position: relative;
// z-index: 2;
// display: flex;
// align-items: center;
// justify-content: space-between;
// padding-left: 24rpx;
// box-sizing: border-box;
// overflow: hidden;
// }
.tui-coupon-content {
width: 82%;
display: flex;
flex-direction: column;
justify-content: center;
}
// .tui-coupon-content {
// width: 82%;
// display: flex;
// flex-direction: column;
// justify-content: center;
// }
.tui-coupon-title-box {
display: flex;
align-items: center;
}
// .tui-coupon-title-box {
// display: flex;
// align-items: center;
// }
.tui-coupon-btn {
padding: 6rpx;
background: #ffebeb;
color: #e41f19;
font-size: 25rpx;
line-height: 25rpx;
display: flex;
align-items: center;
justify-content: center;
transform: scale(0.9);
transform-origin: 0 center;
border-radius: 4rpx;
flex-shrink: 0;
}
// .tui-coupon-btn {
// padding: 6rpx;
// background: #ffebeb;
// color: #e41f19;
// font-size: 25rpx;
// line-height: 25rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// transform: scale(0.9);
// transform-origin: 0 center;
// border-radius: 4rpx;
// flex-shrink: 0;
// }
.tui-color-grey {
color: #888 !important;
}
// .tui-color-grey {
// color: #888 !important;
// }
.tui-bg-grey {
background: #f0f0f0 !important;
color: #888 !important;
}
// .tui-bg-grey {
// background: #f0f0f0 !important;
// color: #888 !important;
// }
.tui-coupon-title {
width: 100%;
font-size: 26rpx;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
// .tui-coupon-title {
// width: 100%;
// font-size: 26rpx;
// color: #333;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// }
.tui-coupon-rule {
padding-top: 52rpx;
}
// .tui-coupon-rule {
// padding-top: 52rpx;
// }
.tui-rule-box {
display: flex;
align-items: center;
transform: scale(0.8);
transform-origin: 0 100%;
}
// .tui-rule-box {
// display: flex;
// align-items: center;
// transform: scale(0.8);
// transform-origin: 0 100%;
// }
.tui-padding-btm {
padding-bottom: 6rpx;
}
// .tui-padding-btm {
// padding-bottom: 6rpx;
// }
.tui-coupon-circle {
width: 8rpx;
height: 8rpx;
background: rgb(160, 160, 160);
border-radius: 50%;
}
// .tui-coupon-circle {
// width: 8rpx;
// height: 8rpx;
// background: rgb(160, 160, 160);
// border-radius: 50%;
// }
.tui-coupon-text {
font-size: 28rpx;
line-height: 28rpx;
font-weight: 400;
color: #666;
padding-left: 8rpx;
white-space: nowrap;
}
// .tui-coupon-text {
// font-size: 28rpx;
// line-height: 28rpx;
// font-weight: 400;
// color: #666;
// padding-left: 8rpx;
// white-space: nowrap;
// }
.tui-top20 {
margin-top: 20rpx;
}
// .tui-top20 {
// margin-top: 20rpx;
// }
.tui-coupon-title {
font-size: 28rpx;
line-height: 28rpx;
}
// .tui-coupon-title {
// font-size: 28rpx;
// line-height: 28rpx;
// }
.tui-coupon-radio {
transform: scale(0.7);
transform-origin: 100% center;
}
// .tui-coupon-radio {
// transform: scale(0.7);
// transform-origin: 100% center;
// }
.tui-btn-box {
position: absolute;
width: 146rpx;
height: 52rpx;
right: 20rpx;
bottom: 40rpx;
z-index: 10;
}
// .tui-btn-box {
// position: absolute;
// width: 146rpx;
// height: 52rpx;
// right: 20rpx;
// bottom: 40rpx;
// z-index: 10;
// }
</style>

454
pages/user/coupon/UserCoupon/index.vue

@ -1,72 +1,390 @@
<template>
<view ref="container">
<div class="coupon-list" v-if="couponsList.length > 0">
<div class="item acea-row row-center-wrapper" v-cloak v-for="(item, index) in couponsList" :key="index">
<div class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<div>
<span class="num">{{ item.couponPrice }}</span>
</div>
<div class="pic-num">{{ item.useMinPrice }}元可用</div>
</div>
<div class="text">
<div class="condition line1">
{{ item.couponTitle }}
</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.endTime === 0">不限时</div>
<div v-else>{{ item.createTime }}-{{ item.endTime }}</div>
<div class="bnt gray" v-if="item._type === 0">{{ item._msg }}</div>
<div class="bnt bg-color-red" v-else>{{ item._msg }}</div>
</div>
</div>
</div>
</div>
<!--暂无优惠券-->
<view class="noCommodity" v-if="couponsList.length === 0 && loading === true">
<view class="noPictrue">
<image :src="`${$VUE_APP_RESOURCES_URL}/images/noCoupon.png`" class="image" />
</view>
</view>
</view>
<view ref="container">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">我的券包</view>
</block>
</cu-custom>
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:'+CustomBar+'px'">
<view class="nav acea-row row-around">
<view class="item" @click="setType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">待领取</view>
</view>
<view class="item" @click="setType(1)">
<view :class="'title ' + (navType === 1 ? 'active' : '')">已领取</view>
</view>
<view class="item" @click="setType(2)">
<view :class="'title acea-row row-middle ' + (navType === 2 ? 'active' : '')">已失效</view>
</view>
</view>
</view>
<view class="coupon-list" v-if="couponsList.length > 0">
<view class="item acea-row row-between" v-cloak v-for="(item, index) in couponsList" :key="index">
<image class="coupon-bg" src="@/static/images/coupon-bg.png" mode=""></image>
<view class="coupon-left">
<image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image>
<image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box">
<view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">7<text></text></view> -->
<view class="line"></view>
<view class="tip acea-row row-between">
<view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view>
<view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view>
</view>
</view>
</view>
<view class="coupon-right acea-row row-center-column">
<image v-if="item._msg == '已过期'" class="tag"
src="../../../../static/images/failure-icon.png" mode=""></image>
<image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
<image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
</image>
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">{{ item.useMinPrice }}可用</view>
<view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view>
<view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view>
<!-- <view class="btn btn-white">去使用</view> -->
</view>
<!-- <div class="money" :class="item._type === 0 ? 'moneyGray' : ''">
<div>
<span class="num">{{ item.couponPrice }}</span>
</div>
<div class="pic-num">{{ item.useMinPrice }}元可用</div>
</div>
<div class="text">
<div class="condition line1">{{ item.couponTitle }}</div>
<div class="data acea-row row-between-wrapper">
<div v-if="item.endTime === 0">不限时</div>
<div v-else>{{ item.createTime }}-{{ item.endTime }}</div>
<div class="bnt gray" v-if="item._type === 0">{{ item._msg }}</div>
<div class="bnt bg-color-red" v-else>{{ item._msg }}</div>
</div>
</div> -->
</view>
</view>
<!--暂无优惠券-->
<view class="noCommodity" v-if="couponsList.length === 0 && loading === false" style="padding-top:208rpx;">
<view class="noPictrue">
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/noCoupon.png`" class="image" /> -->
<image src="@/static/images/no-more.png" class="image" />
</view>
<view class="text-big">
什么都没有大概被外星人带走了
</view>
<view class="text-small">
快去领取福利优惠券吧
</view>
</view>
</view>
</view>
</template>
<script>
import { getCouponsUser } from '@/api/user'
import DataFormatT from '@/components/DataFormatT'
const NAME = 'UserCoupon'
export default {
name: 'UserCoupon',
components: {
DataFormatT,
},
props: {},
data: function() {
return {
couponsList: [],
loading: false,
}
},
watch: {
$yroute: function(n) {
var that = this
if (n.name === NAME) {
that.getUseCoupons()
}
},
},
mounted: function() {
this.getUseCoupons()
},
methods: {
getUseCoupons: function() {
let that = this,
type = 0
getCouponsUser(type).then(res => {
that.couponsList = res.data
that.loading = true
})
},
},
}
import {
getCouponsUser,
getCouponReceive,
getCanReceive,
getUserFailure
} from '@/api/user'
import DataFormatT from '@/components/DataFormatT'
const NAME = 'UserCoupon'
export default {
name: 'UserCoupon',
components: {
DataFormatT,
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
navType: 1,
couponsList: [],
loading: false,
page: 1,
limit: 10,
}
},
watch: {
$yroute: function(n) {
var that = this
if (n.name === NAME) {
that.getUseCoupons()
}
},
},
mounted: function() {
this.getUseCoupons(1)
},
methods: {
setType(i) {
uni.showLoading({
title:''
})
if (this.navType == i) return;
this.navType = i;
this.couponsList=[];
this.page= 1,
this.limit= 10,
this.getUseCoupons(i);
},
//
getCoupon: function(id, index) {
let that = this
if(that.navType===2) return
if(that.navType===1){
that.$yrouter.push({
path: '/pages/shop/brands/index',
})
return
}
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons: function(i) {
if (this.loading) return //false
// if (this.loadend) return //false
this.loading = true
let q = {
page: this.page,
limit: this.limit
}
let type = 0
if (i === 1) {
//
getCouponsUser(type).then(res => {
res.data.forEach(item=>{
if(item._msg!=='已过期'){
this.couponsList.push(item)
}
})
// this.couponsList = res.data
this.loading = false
})
}else if(i===0){
getCanReceive(q).then(res => {
res.data.forEach(item=>{
if(!item.isUse){
this.couponsList.push(item)
}
})
this.loading = false
this.page = this.page + 1
})
}else{
getUserFailure(type).then(res=>{
res.data.forEach(item=>{
if(item._msg==='已过期'){
this.couponsList.push(item)
}
})
this.loading = false
})
}
uni.hideLoading();
},
// getUseCoupons: function(i) {
// if (this.loading) return //false
// // if (this.loadend) return //false
// this.loading = true
// let q = {
// page: this.page,
// limit: this.limit
// }
// let type = 0
// if (i === 1) {
// //
// getCouponsUser(type).then(res => {
// this.couponsList = res.data
// this.loading = false
// })
// }else if(i===0){
// getCoupon(q).then(res => {
// res.data.forEach(item=>{
// if(!item.isUse){
// this.couponsList.push(item)
// }
// })
// this.loading = false
// this.page = this.page + 1
// })
// }else{
// this.loading = false
// }
// },
},
}
</script>
<style lang="less" scoped>
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.content {
width: 100%;
height: 100%;
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.nav {
width: 100vw;
background: #FFFFFF;
height: 88rpx;
padding: 34rpx 52rpx 12rpx;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
text-align: center;
position: relative;
.title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.active {
color: #2DB5AE;
font-weight: 600;
}
.title::after {
display: block;
content: '';
width: 100%;
height: 2rpx;
background: #2DB5AE;
position: absolute;
bottom: 0;
left: 0;
opacity: 0;
transform: scaleX(0);
transition: all .2s cubic-bezier(.18, .89, .17, .88), opacity .15s ease;
}
.active::after {
opacity: 1;
transform: scaleX(1);
}
}
}
.coupon-list {
padding-top: 104rpx;
}
.noCommodity{
.noPictrue{
width: 428rpx;
height: 526rpx;
}
.text-big{
padding: 0 30rpx;
text-align: center;
font-family: PingFangSC-Medium, PingFang SC;
font-style: 36rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.text-small{
padding: 0 80rpx;
font-family: PingFangSC-Medium, PingFang SC;
text-align: center;
font-style: 28rpx;
font-weight: 400;
color: #3A3A3C;
line-height: 40rpx;
}
}
}
</style>

89
pages/user/signIn/Integral/index.vue

@ -1,9 +1,21 @@
<template>
<view class="integral-details" ref="container">
<view class="header">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">积分明细</view>
</block>
</cu-custom>
</view>
<!-- <view class="header">
<view class="currentScore">当前积分</view>
<view>{{ info.integral }}</view>
<view class="line"></view>
<view class="line"></view> -->
<!--<view class="nav acea-row">-->
<!--<view class="item">-->
<!--<view class="num">{{ info.sum_integral }}</view>-->
@ -18,9 +30,9 @@
<!--<view>今日获得</view>-->
<!--</view>-->
<!--</view>-->
</view>
<!-- </view> -->
<view class="wrapper">
<view class="nav acea-row">
<!-- <view class="nav acea-row">
<view
class="item acea-row row-center-wrapper"
:class="current === navListIndex ? 'on' : ''"
@ -31,7 +43,7 @@
<text class="iconfont" :class="item.icon"></text>
{{ item.name }}
</view>
</view>
</view> -->
<view class="list" :hidden="current !== 0">
<!--<view class="tip acea-row row-middle">-->
<!--<text class="iconfont icon-shuoming"><text-->
@ -42,12 +54,12 @@
v-for="(item, listIndex) in list"
:key="listIndex"
>
<view>
<text class="state">{{ item.title }}</text>
<div>{{ item.createTime }}</div>
</view>
<text class="num" v-if="item.pm == 1">+{{ item.number }}</text>
<text class="num font-color-red" v-if="item.pm == 0">-{{ item.number }}</text>
<view>
<view>{{ item.title }}</view>
<view class="time">{{ item.createTime }}</view>
</view>
<text class="num" v-if="item.pm == 1">积分+{{ item.number }}</text>
<text class="num" v-if="item.pm == 0">积分-{{ item.number }}</text>
</view>
</view>
<!--<view class="list2" :hidden="current !== 1">-->
@ -159,7 +171,56 @@ export default {
}
};
</script>
<style lang="less">
.list {
}
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.integral-details .wrapper {
margin: 20rpx 32rpx 32rpx;
.list {
width: 100%;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.item {
height: 100rpx;
border-bottom: 2rpx solid #D8D8D8;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #3A3A3C;
line-height: 26rpx;
padding: 0rpx 30rpx;
.time {
padding-top: 2rpx;
font-size: 20rpx;
color: #999999;
line-height: 24rpx;
}
.num {
font-weight: 600;
color: #3A3A3C;
}
}
.item:last-child {
border-bottom: none;
}
}
}
</style>

373
pages/user/signIn/Sign/index.vue

@ -1,6 +1,84 @@
<template>
<view class="sign">
<view class="header bg-color-red">
<view class="bg">
<image src="@/static/images/namecard-bg.png" mode=""></image>
</view>
<view class="header">
<cu-custom :isBack="true" :isCenter="true" :bgColor="bgColor">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title" :style="bgColor?'color:#2DB5AE;':''">签到有礼</view>
</block>
</cu-custom>
</view>
<view class="top-box acea-row row-middle">
<view class="but-box" @click="goSign">
<view class="but">{{ userInfo.isDaySign ? "已签到" : "签到" }}</view>
</view>
<view class="text">
<view class="">积分</view>
<view class="integral">{{ userInfo.integral || 0 }}</view>
<view class="" v-if="!userInfo.isDaySign">今日未签到签到可得{{signSystemList[sign_index].sign_num || 0}}积分</view>
</view>
<view @click="goSignRecord()" class="right acea-row row-between-wrapper">
<image src="../../../../static/images/mingxi.png" mode=""></image>
<view>明细</view>
</view>
</view>
<view class="signList-box acea-row row-between-wrapper">
<view class="item" v-for="(item, signSystemListIndex) in signSystemList" :key="signSystemListIndex">
<view :class="'acea-row row-column row-center day ' + (sign_index >= signSystemListIndex + 1 ? 'rewardTxt' : '')">
<text class="">{{ item.day.split(' ')[0] }}</text>
<text style="font-size: 16rpx;">{{ item.day.split(' ')[1] }}</text>
</view>
<!-- <view :class="signSystemListIndex + 1 === signSystemList.length ? 'rewardTxt day' : 'day'">{{ item.day }}</view> -->
<!-- <view class="venus" :class=" (signSystemListIndex + 1 === signSystemList.length ? 'reward' : '') +' ' + (sign_index >= signSystemListIndex + 1 ? 'venusSelect' : '')"></view> -->
<view class="num" :class="sign_index >= signSystemListIndex + 1 ? 'on' : ''">+{{ item.sign_num }}</view>
</view>
</view>
<view class="info-box">
<view class="wrapper acea-row row-column row-middle">
<view class="tip">已累计签到</view>
<view class="num-box acea-row row-center row-bottom">
<view class="item" v-if="signCount.length < 4">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">{{ 0 }}</view>
</view>
<view class="item" v-for="(item, signCountIndex) in signCount.length" :key="signCountIndex">
<view class="top"></view>
<view class="bottom"></view>
<view class="num">{{ signCount[item] || 0 }}</view>
</view>
<view class="data"></view>
</view>
<view class="tip2">据说连续签到{{day}}天可获得超额积分一定要坚持签到哦</view>
</view>
<!-- <view class="list">
<view class="item acea-row row-between-wrapper" v-for="(item, signListIndex) in signList" :key="signListIndex">
<view>
<view class="name line1">{{ item.title }}</view>
<view class="data">{{ item.addTime }}</view>
</view>
<view class="num">积分+{{ item.number }}</view>
</view>
</view> -->
</view>
<view class="list-box">
<view class="title">积分兑换</view>
<PromotionGood :benefit="productList" :isIntegral="true" />
</view>
<!-- <view class="header bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view class="left acea-row row-between-wrapper">
<view class="pictrue">
@ -27,7 +105,7 @@
<view class="num" :class="sign_index >= signSystemListIndex + 1 ? 'on' : ''">+{{ item.sign_num }}</view>
</view>
</view>
<!--加在 but on 为已签到-->
加在 but on 为已签到
<view class="but bg-color-red" :class="userInfo.is_day_sgin ? 'on' : ''" @click="goSign">{{ userInfo.isDaySign ? "已签到" : "立即签到" }}</view>
<view class="lock"></view>
</view>
@ -62,10 +140,251 @@
<view class="signTipBnt" @click="close">好的</view>
</view>
</view>
<view class="mask" @touchmove.prevent :hidden="active === false"></view>
<view class="mask" @touchmove.prevent :hidden="active === false"></view> -->
</view>
</template>
<style scoped lang="less">
.header {
// position: fixed;
// top:0;
// left:0;
// right:0;
// z-index: 99;
// width: 100vw;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.bg {
width: 100vw;
height: 540rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
image {
width: 100%;
height: 100%;
}
}
.top-box {
padding: 40rpx 32rpx 70rpx;
position: relative;
.but-box {
width: 168rpx;
height: 168rpx;
padding: 4rpx;
background: linear-gradient(135deg, rgba(27, 141, 204, 1), rgba(57, 211, 150, 1));
border-radius: 50%;
box-shadow: 0rpx 0rpx 20rpx 6rpx rgba(0,0,0,0.08);
margin-left: 32rpx;
.but {
width: 100%;
height: 100%;
border-radius: 50%;
background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
font-size: 42rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 160rpx;
text-align: center;
}
}
.text {
padding-left: 34rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 36rpx;
.integral {
font-size: 76rpx;
color: #FFFFFF;
line-height: 80rpx;
padding-bottom: 8rpx;
}
}
.right {
width: 96rpx;
height: 46rpx;
padding: 0rpx 12rpx;
background: #FFFFFF;
border-radius: 16rpx;
font-size: 20rpx;
font-family: PingFangTC;
font-weight: 600;
color: #2DB5AE;
line-height: 24rpx;
position: absolute;
top: 38rpx;
right: 32rpx;
image {
width: 24rpx;
height: 24rpx;
}
}
}
.signList-box {
width: 686rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin: 0rpx 32rpx 20rpx;
padding: 32rpx 32rpx 36rpx;
.item {
text-align: center;
.day {
width: 76rpx;
height: 76rpx;
background: #D8D8D8;
border-radius: 50%;
font-size: 32rpx;
font-family: Futura;
font-weight: bold;
color: #FFFFFF;
// line-height: 76rpx;
}
.day.rewardTxt {
background: linear-gradient(135deg, #39D396 0%, #1B8DCC 100%);
}
.num {
padding-top: 8rpx;
font-size: 20rpx;
font-family: PingFangTC;
font-weight: 500;
color: #D8D8D8;
line-height: 24rpx;
}
.num.on {
color: #2DB5AE;
}
}
}
.info-box {
margin: 0rpx 32rpx;
width: 686rpx;
// height: 894rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
.wrapper {
padding-top: 38rpx;
.tip {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 26rpx;
}
.num-box {
padding: 20rpx 0rpx;
.item {
position: relative;
margin-right: 16rpx;
.top {
width: 94rpx;
height: 76rpx;
background: #3A3A3C;
border-radius: 20rpx 20rpx 0rpx 0rpx;
margin-bottom: 6rpx;
}
.bottom {
width: 94rpx;
height: 76rpx;
background: #3A3A3C;
border-radius: 0rpx 0rpx 20rpx 20rpx;
}
.num {
width: 94rpx;
height: 158rpx;
font-size: 134rpx;
font-family: Futura;
font-weight: 600;
color: #F5F6F8;
line-height: 158rpx;
text-align: center;
position: absolute;
top: 0;
left: 0;
}
}
.data {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #3A3A3C;
line-height: 26rpx;
// padding-left: 14rpx;
}
}
.tip2 {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 26rpx;
padding-bottom: 36rpx;
}
}
}
// .info-box .list {
// width: 100%;
// height: 570rpx;
// overflow-y: scroll;
// .item {
// width: 100%;
// height: 98rpx;
// padding: 0rpx 30rpx;
// border-top: 2rpx solid #D8D8D8;
// font-size: 24rpx;
// line-height: 26rpx;
// font-family: PingFang SC;
// font-weight: 500;
// color: #3A3A3C;
// .name {
// }
// .data {
// padding-top: 2rpx;
// font-size: 20rpx;
// color: #999999;
// line-height: 24rpx;
// }
// .num {
// font-weight: 600;
// }
// }
// }
.list-box {
.title {
font-size: 30rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
color: #3A3A3C;
line-height: 46rpx;
padding: 20rpx 32rpx;
}
}
.Loads .iconfont {
font-size: 0.25*100rpx;
margin: 0.02*100rpx 0 0 0.1*100rpx;
@ -81,13 +400,19 @@
import {
add
} from "@/utils/bc";
import PromotionGood from '@/components/PromotionGood';
import { getProductsIntegral } from '@/api/store';
export default {
name: "Sign",
components: {},
components: {
PromotionGood
},
props: {},
data: function() {
return {
CustomBar: this.CustomBar,
bgColor: '',
userInfo: {},
integral: 0,
signCount: [],
@ -97,7 +422,14 @@
page: 1,
limit: 3,
active: false,
day: ""
day: "",
from: {
page: 1,
limit: 15,
news: 0,
isIntegral: 1
},
productList: [],
};
},
mounted: function() {
@ -105,10 +437,24 @@
this.signUser();
this.signConfig();
this.getSignList();
this.getGoodsList();
},
onPageScroll(e) {
if (e.scrollTop > 80) {
this.bgColor = '#F1F1F1';
} else {
this.bgColor = '';
};
},
methods: {
goSignRecord() {
this.$yrouter.push("/pages/user/signIn/SignRecord/index");
this.$yrouter.push('/pages/user/signIn/Integral/index');
// this.$yrouter.push("/pages/user/signIn/SignRecord/index");
},
getGoodsList() {
getProductsIntegral(this.from).then(res => {
this.productList.push.apply(this.productList, res.data);
})
},
// js0num0length
PrefixInteger: function(num, length) {
@ -133,8 +479,10 @@
uni.hideLoading();
res.data.integral = parseInt(res.data.integral);
var sumSginDay = res.data.sumSignDay;
that.userInfo = res.data;
that.signCount = that.PrefixInteger(sumSginDay, 4);
that.signCount = String(res.data.sumSignDay);
// that.signCount = that.PrefixInteger(sumSginDay, 4);
that.sign_index = parseInt(res.data.signNum);
});
},
@ -150,7 +498,7 @@
goSign: function() {
let that = this,
sumSginDay = that.userInfo.sumSignDay;
if (that.userInfo.is_day_sgin) {
if (that.userInfo.is_day_sgin || that.userInfo.isDaySign) {
uni.showToast({
title: "您今日已签到!",
icon: "none",
@ -164,8 +512,15 @@
let sign_index = parseInt(that.sign_index + 1);
that.sign_index =
sign_index > that.signSystemList.length ? 1 : sign_index;
that.signCount = that.PrefixInteger(sumSginDay + 1, 4);
// that.signCount = that.PrefixInteger(sumSginDay + 1, 4);
that.signCount = String(sumSginDay + 1);
that.userInfo.is_day_sgin = true;
that.userInfo.isDaySign = true;
uni.showModal({
title:'签到成功!',
showCancel: false,
confirmColor: '#2DB5AE',
})
that.userInfo.integral = add(that.userInfo.integral, res.data.integral);
that.getSignList();
});

37
pages/user/signIn/SignRecord/index.vue

@ -1,5 +1,18 @@
<template>
<view class="sign-record" ref="container">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">签到记录</view>
</block>
</cu-custom>
</view>
<view class="list">
<view class="item" v-for="(item, signListIndex) in signList" :key="signListIndex">
<view class="data">{{ item.time }}</view>
@ -13,7 +26,7 @@
<view class="name line1">{{ itemn.title }}</view>
<view>{{ itemn.addTime }}</view>
</view>
<view class="num font-color-red">+{{ itemn.number }}</view>
<view class="num">积分+{{ itemn.number }}</view>
</view>
</view>
</view>
@ -56,10 +69,30 @@ export default {
that.loading = false;
//apply();js;
that.signList.push.apply(that.signList, res.data.list);
that.loadend = res.data.length < that.limit; //
that.loadend = res.data.list.length < that.limit; //
that.page = that.page + 1;
});
}
}
};
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
</style>

BIN
static/icon-cart-hot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 442 B

BIN
static/icon-cart.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 448 B

BIN
static/icon-class-hot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 361 B

BIN
static/icon-class.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 361 B

BIN
static/icon-home-hot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 535 B

BIN
static/icon-home.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 523 B

BIN
static/icon-user-hot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 483 B

BIN
static/icon-user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 490 B

BIN
static/images/Q&A.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/about-us.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

BIN
static/images/add-addr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

BIN
static/images/add-btn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

BIN
static/images/back-btn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
static/images/bj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

BIN
static/images/by.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

BIN
static/images/camera.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

BIN
static/images/cart-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

BIN
static/images/check-circle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

BIN
static/images/close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

BIN
static/images/coupon-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/images/coupon-bg2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save