Forráskód Böngészése

nope: 格式化代码
user
utils
根目录
components
api
pages/activity
pages/admin
all

joe 4 éve
szülő
commit
69f2b4f9a3
100 módosított fájl, 4488 hozzáadás és 3012 törlés
  1. 51 45
      view/xcx/api/activity.js
  2. 31 16
      view/xcx/api/admin.js
  3. 101 65
      view/xcx/api/api.js
  4. 16 9
      view/xcx/api/message.js
  5. 18 12
      view/xcx/api/mine.js
  6. 78 71
      view/xcx/api/order.js
  7. 66 52
      view/xcx/api/store.js
  8. 131 121
      view/xcx/api/user.js
  9. 141 134
      view/xcx/app.js
  10. 151 153
      view/xcx/app.json
  11. 0 0
      view/xcx/app.wxss
  12. 73 49
      view/xcx/components/address-window/index.js
  13. 2 2
      view/xcx/components/address-window/index.json
  14. 19 15
      view/xcx/components/address-window/index.wxml
  15. 87 13
      view/xcx/components/address-window/index.wxss
  16. 85 63
      view/xcx/components/authorize/authorize.js
  17. 1 1
      view/xcx/components/authorize/authorize.json
  18. 14 12
      view/xcx/components/authorize/authorize.wxml
  19. 77 12
      view/xcx/components/authorize/authorize.wxss
  20. 58 50
      view/xcx/components/coupon-list-window/index.js
  21. 2 2
      view/xcx/components/coupon-list-window/index.json
  22. 23 21
      view/xcx/components/coupon-list-window/index.wxml
  23. 79 24
      view/xcx/components/coupon-list-window/index.wxss
  24. 19 19
      view/xcx/components/coupon-window/index.js
  25. 1 1
      view/xcx/components/coupon-window/index.json
  26. 21 21
      view/xcx/components/coupon-window/index.wxml
  27. 0 0
      view/xcx/components/coupon-window/index.wxss
  28. 17 14
      view/xcx/components/general-window/index.js
  29. 1 1
      view/xcx/components/general-window/index.json
  30. 7 6
      view/xcx/components/general-window/index.wxml
  31. 83 10
      view/xcx/components/general-window/index.wxss
  32. 36 31
      view/xcx/components/goodList/index.js
  33. 2 2
      view/xcx/components/goodList/index.json
  34. 32 29
      view/xcx/components/goodList/index.wxml
  35. 81 13
      view/xcx/components/goodList/index.wxss
  36. 62 59
      view/xcx/components/home/index.js
  37. 2 2
      view/xcx/components/home/index.json
  38. 14 18
      view/xcx/components/home/index.wxml
  39. 54 8
      view/xcx/components/home/index.wxss
  40. 163 161
      view/xcx/components/mine/index.js
  41. 4 4
      view/xcx/components/mine/index.json
  42. 32 32
      view/xcx/components/mine/index.wxml
  43. 114 102
      view/xcx/components/mine/index.wxss
  44. 80 65
      view/xcx/components/navbar/index.js
  45. 2 2
      view/xcx/components/navbar/index.json
  46. 15 11
      view/xcx/components/navbar/index.wxml
  47. 105 17
      view/xcx/components/navbar/index.wxss
  48. 16 17
      view/xcx/components/orderGoods/index.js
  49. 4 4
      view/xcx/components/orderGoods/index.json
  50. 23 20
      view/xcx/components/orderGoods/index.wxml
  51. 13 3
      view/xcx/components/orderGoods/index.wxss
  52. 129 84
      view/xcx/components/payment/index.js
  53. 2 2
      view/xcx/components/payment/index.json
  54. 13 12
      view/xcx/components/payment/index.wxml
  55. 46 45
      view/xcx/components/payment/index.wxss
  56. 161 121
      view/xcx/components/price-change/index.js
  57. 2 2
      view/xcx/components/price-change/index.json
  58. 39 57
      view/xcx/components/price-change/index.wxml
  59. 0 4
      view/xcx/components/price-change/index.wxss
  60. 107 91
      view/xcx/components/product-window/index.js
  61. 2 2
      view/xcx/components/product-window/index.json
  62. 44 34
      view/xcx/components/product-window/index.wxml
  63. 168 28
      view/xcx/components/product-window/index.wxss
  64. 37 35
      view/xcx/components/productConSwiper/index.js
  65. 2 2
      view/xcx/components/productConSwiper/index.json
  66. 21 20
      view/xcx/components/productConSwiper/index.wxml
  67. 68 10
      view/xcx/components/productConSwiper/index.wxss
  68. 41 32
      view/xcx/components/promotionGood/index.js
  69. 2 2
      view/xcx/components/promotionGood/index.json
  70. 25 22
      view/xcx/components/promotionGood/index.wxml
  71. 55 10
      view/xcx/components/promotionGood/index.wxss
  72. 35 30
      view/xcx/components/recommend/index.js
  73. 2 2
      view/xcx/components/recommend/index.json
  74. 21 18
      view/xcx/components/recommend/index.wxml
  75. 59 12
      view/xcx/components/recommend/index.wxss
  76. 25 22
      view/xcx/components/share-red-packets/index.js
  77. 2 2
      view/xcx/components/share-red-packets/index.json
  78. 12 12
      view/xcx/components/share-red-packets/index.wxml
  79. 79 11
      view/xcx/components/share-red-packets/index.wxss
  80. 26 22
      view/xcx/components/swipers/index.js
  81. 2 2
      view/xcx/components/swipers/index.json
  82. 14 11
      view/xcx/components/swipers/index.wxml
  83. 36 6
      view/xcx/components/swipers/index.wxss
  84. 19 19
      view/xcx/components/userEvaluation/index.js
  85. 1 1
      view/xcx/components/userEvaluation/index.json
  86. 22 23
      view/xcx/components/userEvaluation/index.wxml
  87. 84 13
      view/xcx/components/userEvaluation/index.wxss
  88. 14 14
      view/xcx/components/write-off/index.js
  89. 1 1
      view/xcx/components/write-off/index.json
  90. 11 9
      view/xcx/components/write-off/index.wxml
  91. 95 17
      view/xcx/components/write-off/index.wxss
  92. 13 13
      view/xcx/package.json
  93. 122 103
      view/xcx/pages/activity/goods_bargain/index.js
  94. 5 5
      view/xcx/pages/activity/goods_bargain/index.json
  95. 19 16
      view/xcx/pages/activity/goods_bargain/index.wxml
  96. 0 2
      view/xcx/pages/activity/goods_bargain/index.wxss
  97. 364 281
      view/xcx/pages/activity/goods_bargain_details/index.js
  98. 5 5
      view/xcx/pages/activity/goods_bargain_details/index.json
  99. 129 109
      view/xcx/pages/activity/goods_bargain_details/index.wxml
  100. 0 2
      view/xcx/pages/activity/goods_bargain_details/index.wxss

+ 51 - 45
view/xcx/api/activity.js

@@ -1,161 +1,167 @@
 import request from "./../utils/request.js";
 /**
- * 
  * 所有活动接口 包括:拼团,砍价,秒杀
- * 
-*/
+ */
 
 /**
  * 拼团列表
- * 
-*/
+ */
 export function getCombinationList(data) {
-  return request.get('combination/list', data,{noAuth:true});
+    return request.get('combination/list', data, {
+        noAuth: true
+    });
 }
 
 /**
  * 拼团详情
- * 
-*/
+ */
 export function getCombinationDetail(id) {
-  return request.get('combination/detail/'+id);
+    return request.get('combination/detail/' + id);
 }
 
 /**
  * 拼团 开团
  */
 export function getCombinationPink(id) {
-  return request.get("combination/pink/" + id);
+    return request.get("combination/pink/" + id);
 }
 
 /**
  * 拼团 取消开团
  */
 export function postCombinationRemove(data) {
-  return request.post("combination/remove",data);
+    return request.post("combination/remove", data);
 }
 
 /**
  * 砍价列表
  */
 export function getBargainList(data) {
-  return request.get("bargain/list", data,{noAuth:true});
+    return request.get("bargain/list", data, {
+        noAuth: true
+    });
 }
 
 /**
  * 
  * 砍价列表(已参与)
  * @param object data
-*/
-export function getBargainUserList(data){
-  return request.get('bargain/user/list',data);
+ */
+export function getBargainUserList(data) {
+    return request.get('bargain/user/list', data);
 }
 
-
 /**
- * 
  * 取消砍价
  * @param int bargainId
-*/
-export function bargainUserCancel(bargainId){
-  return request.post('bargain/user/cancel', { bargainId: bargainId})
+ */
+export function bargainUserCancel(bargainId) {
+    return request.post('bargain/user/cancel', {
+        bargainId: bargainId
+    })
 }
 
 /**
  * 砍价产品详情
  */
 export function getBargainDetail(id) {
-  return request.get("bargain/detail/" + id);
+    return request.get("bargain/detail/" + id);
 }
 
 /**
  * 砍价 开启砍价用户信息
  */
 export function postBargainStartUser(data) {
-  return request.post("bargain/start/user", data);
+    return request.post("bargain/start/user", data);
 }
 
 /**
  * 砍价开启
  */
 export function postBargainStart(bargainId) {
-  return request.post("bargain/start", { bargainId: bargainId});
+    return request.post("bargain/start", {
+        bargainId: bargainId
+    });
 }
 
 /**
  * 砍价 帮助好友砍价
  */
 export function postBargainHelp(data) {
-  return request.post("bargain/help", data);
+    return request.post("bargain/help", data);
 }
 
 /**
  * 砍价 砍掉金额
  */
 export function postBargainHelpPrice(data) {
-  return request.post("bargain/help/price", data);
+    return request.post("bargain/help/price", data);
 }
 
 /**
  * 砍价 砍价帮
  */
 export function postBargainHelpList(data) {
-  return request.post("bargain/help/list", data);
+    return request.post("bargain/help/list", data);
 }
 
 /**
  * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
  */
 export function postBargainHelpCount(data) {
-  return request.post("bargain/help/count", data);
+    return request.post("bargain/help/count", data);
 }
 
 /**
  * 砍价 观看/分享/参与次数
  */
 export function postBargainShare(bargainId) {
-  return request.post("bargain/share", { bargainId: bargainId});
+    return request.post("bargain/share", {
+        bargainId: bargainId
+    });
 }
 
 /**
  * 秒杀产品时间区间
  * 
-*/
-export function getSeckillIndexTime(){
-  return request.get('seckill/index',{},{noAuth:true});
+ */
+export function getSeckillIndexTime() {
+    return request.get('seckill/index', {}, {
+        noAuth: true
+    });
 }
 
 /**
  * 秒杀产品列表
  * @param int time
  * @param object data
-*/
-export function getSeckillList(time,data){
-  return request.get('seckill/list/'+time,data,{noAuth:true});
+ */
+export function getSeckillList(time, data) {
+    return request.get('seckill/list/' + time, data, {
+        noAuth: true
+    });
 }
 
 /**
  * 秒杀产品详情
  * @param int id
-*/
-export function getSeckillDetail(id){
-  return request.get('seckill/detail/'+id);
+ */
+export function getSeckillDetail(id) {
+    return request.get('seckill/detail/' + id);
 }
 
 /**
  * 砍价海报
  * @param object data
- * 
-*/
-export function getBargainPoster(data){
-  return request.post('bargain/poster',data)
+ */
+export function getBargainPoster(data) {
+    return request.post('bargain/poster', data)
 }
 
 /**
  * 拼团海报
  * @param object data
- * 
-*/
-export function getCombinationPoster(data){
-  return request.post('combination/poster',data)
+ */
+export function getCombinationPoster(data) {
+    return request.post('combination/poster', data)
 }

+ 31 - 16
view/xcx/api/admin.js

@@ -1,90 +1,105 @@
 import request from "./../utils/request.js";
 /**
- * 
  * 统计管理相关接口
- * 
-*/
+ */
 
 /**
  * 获取快递公司
  * @returns {*}
  */
 export function getLogistics() {
-  return request.get("/logistics");
+    return request.get("/logistics");
 }
 
 /**
  * 统计数据
  */
 export function getStatisticsInfo() {
-  return request.get("admin/order/statistics");
+    return request.get("admin/order/statistics");
 }
+
 /**
  * 订单月统计
  * @param object data
  */
 export function getStatisticsMonth(data) {
-  return request.get("admin/order/data", data);
+    return request.get("admin/order/data", data);
 }
+
 /**
  * 订单月统计
  */
 export function getAdminOrderList(where) {
-  return request.get("admin/order/list", where);
+    return request.get("admin/order/list", where);
 }
+
 /**
  * 订单改价
  */
 export function setAdminOrderPrice(data) {
-  return request.post("/admin/order/price", data, { login: true });
+    return request.post("/admin/order/price", data, {
+        login: true
+    });
 }
+
 /**
  * 订单备注
  */
 export function setAdminOrderRemark(data) {
-  return request.post("/admin/order/remark", data, { login: true });
+    return request.post("/admin/order/remark", data, {
+        login: true
+    });
 }
+
 /**
  * 订单详情
  */
 export function getAdminOrderDetail(orderId) {
-  return request.get("/admin/order/detail/" + orderId);
+    return request.get("/admin/order/detail/" + orderId);
 }
+
 /**
  * 订单发货信息获取
  */
 export function getAdminOrderDelivery(orderId) {
-  return request.get("admin/order/delivery/gain/" + orderId);
+    return request.get("admin/order/delivery/gain/" + orderId);
 }
 
 /**
  * 订单发货保存
  */
 export function setAdminOrderDelivery(data) {
-  return request.post("admin/order/delivery/keep", data);
+    return request.post("admin/order/delivery/keep", data);
 }
+
 /**
  * 订单统计图
  */
 export function getStatisticsTime(data) {
-  return request.get("admin/order/time", data);
+    return request.get("admin/order/time", data);
 }
+
 /**
  * 线下付款订单确认付款
  */
 export function setOfflinePay(data) {
-  return request.post("admin/order/offline", data);
+    return request.post("admin/order/offline", data);
 }
+
 /**
  * 订单确认退款
  */
 export function setOrderRefund(data) {
-  return request.post("admin/order/refund", data);
+    return request.post("admin/order/refund", data);
 }
+
 /**
  * 订单核销
  * @returns {*}
  */
 export function orderVerific(verify_code, is_confirm) {
-  return request.post("order/order_verific", { verify_code, is_confirm });
+    return request.post("order/order_verific", {
+        verify_code,
+        is_confirm
+    });
 }

+ 101 - 65
view/xcx/api/api.js

@@ -1,30 +1,30 @@
 import request from "./../utils/request.js";
 /**
  * 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
- * 
  */
 
 /**
  * 获取主页数据 无需授权
- * 
  */
-export function getIndexData()
-{
-  return request.get("index",{},{ noAuth : true})
+export function getIndexData() {
+    return request.get("index", {}, {
+        noAuth: true
+    })
 }
 
-export function getNotifications()
-{
-  return request.get('notifications', {}, {noAuth: true})
+export function getNotifications() {
+    return request.get('notifications', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 获取登录授权login
- * 
  */
-export function getLogo()
-{
-  return request.get('wechat/get_logo', {}, { noAuth : true})
+export function getLogo() {
+    return request.get('wechat/get_logo', {}, {
+        noAuth: true
+    })
 }
 
 /**
@@ -32,175 +32,211 @@ export function getLogo()
  * @param string formId 
  */
 export function setFormId(formId) {
-  return request.post("wechat/set_form_id", { formId: formId})
+    return request.post("wechat/set_form_id", {
+        formId: formId
+    })
 }
 
 /**
  * 领取优惠卷
  * @param int couponId
- * 
  */
-export function setCouponReceive(couponId){
-  return request.post('coupon/receive', { couponId: couponId})
+export function setCouponReceive(couponId) {
+    return request.post('coupon/receive', {
+        couponId: couponId
+    })
 }
+
 /**
  * 优惠券列表
  * @param object data
  */
-export function getCoupons(data){
-  return request.get('coupons',data,{noAuth:true})
+export function getCoupons(data) {
+    return request.get('coupons', data, {
+        noAuth: true
+    })
 }
 
 /**
  * 我的优惠券
  * @param int types 0全部  1未使用 2已使用
  */
-export function getUserCoupons(types){
-  return request.get('coupons/user/'+types)
+export function getUserCoupons(types) {
+    return request.get('coupons/user/' + types)
 }
 
 /**
  * 文章分类列表
- * 
  */
-export function getArticleCategoryList(){
-  return request.get('article/category/list',{},{noAuth:true})
+export function getArticleCategoryList() {
+    return request.get('article/category/list', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 文章列表
  * @param int cid
- * 
  */
-export function getArticleList(cid,data){
-  return request.get('article/list/' + cid, data,{noAuth:true})
+export function getArticleList(cid, data) {
+    return request.get('article/list/' + cid, data, {
+        noAuth: true
+    })
 }
 
 /**
  * 文章 热门列表
- * 
  */
-export function getArticleHotList(){
-  return request.get('article/hot/list',{},{noAuth:true})
+export function getArticleHotList() {
+    return request.get('article/hot/list', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 文章 轮播列表
- * 
  */
-export function getArticleBannerList(){
-  return request.get('article/banner/list',{},{noAuth:true})
+export function getArticleBannerList() {
+    return request.get('article/banner/list', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 文章详情
  * @param int id 
- * 
  */
-export function getArticleDetails(id){
-  return request.get('article/details/'+id,{},{noAuth:true})
+export function getArticleDetails(id) {
+    return request.get('article/details/' + id, {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 手机号+验证码登录接口
  * @param object data
  */
-export function loginMobile(data){
-  return request.post('login/mobile',data,{noAuth:true})
+export function loginMobile(data) {
+    return request.post('login/mobile', data, {
+        noAuth: true
+    })
 }
 
 /**
  * 验证码发送
  * @param object phone
  */
-export function registerVerify(code, key, phone, reset){
-  return request.post('register/verify', { code: code, key: key, phone: phone, type: reset === undefined ? 'reset' : reset },{noAuth:true})
+export function registerVerify(code, key, phone, reset) {
+    return request.post('register/verify', {
+        code: code,
+        key: key,
+        phone: phone,
+        type: reset === undefined ? 'reset' : reset
+    }, {
+        noAuth: true
+    })
 }
 
 /**
  * 手机号注册
  * @param object data
- * 
  */
-export function phoneRegister(data){
-  return request.post('register',data,{noAuth:true})
+export function phoneRegister(data) {
+    return request.post('register', data, {
+        noAuth: true
+    })
 }
 
 /**
  * 手机号修改密码
  * @param object data
- * 
  */
-export function phoneRegisterReset(data){
-  return request.post('register/reset',data,{noAuth:true})
+export function phoneRegisterReset(data) {
+    return request.post('register/reset', data, {
+        noAuth: true
+    })
 }
 
 /**
  * 手机号+密码登录
  * @param object data
- * 
  */
-export function phoneLogin(data){
-  return request.post('login',data,{noAuth:true})
+export function phoneLogin(data) {
+    return request.post('login', data, {
+        noAuth: true
+    })
 }
 
 /**
  * 切换H5登录
  * @param object data
  */
-export function switchH5Login(){
-  return request.post('switch_h5', { 'from':'routine'})
+export function switchH5Login() {
+    return request.post('switch_h5', {
+        'from': 'routine'
+    })
 }
 
 /**
  * 绑定手机号
- * 
  */
-export function bindingPhone(data){
-  return request.post('binding',data)
+export function bindingPhone(data) {
+    return request.post('binding', data)
 }
 
 /**
  * 退出登錄
- * 
  */
-export function logout(){
-  return request.get('logout')
+export function logout() {
+    return request.get('logout')
 }
 
 /**
  * 获取订阅消息id
  */
-export function getTemlIds()
-{
-  return request.get('wechat/teml_ids', {}, { noAuth:true})
+export function getTemlIds() {
+    return request.get('wechat/teml_ids', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 获取小程序直播列表
  */
-export function getLiveList(page,limit) {
-  return request.get('wechat/live', { page, limit }, { noAuth: true })
+export function getLiveList(page, limit) {
+    return request.get('wechat/live', {
+        page,
+        limit
+    }, {
+        noAuth: true
+    })
 }
 
 /**
  * 获取key值
  */
 export function verifyCode() {
-  return request.get('verify_code', {}, { noAuth: true })
+    return request.get('verify_code', {}, {
+        noAuth: true
+    })
 }
+
 /**
  * 获取城市信息
  */
 export function getCity() {
-  return request.get('city_list', {}, { noAuth: true })
+    return request.get('city_list', {}, {
+        noAuth: true
+    })
 }
 
 export function getUserNotifications() {
-  return request.get('user/notifications', {})
+    return request.get('user/notifications', {})
 }
 
 // 获取排行榜
 export function getLeaderBoard() {
-  return request.get('boards', {}, { noAuth: true })
+    return request.get('boards', {}, {
+        noAuth: true
+    })
 }

+ 16 - 9
view/xcx/api/message.js

@@ -1,26 +1,33 @@
 import request from "./../utils/request.js";
 /**
  * 消息相关接口
- * 
-*/
+ */
 
 /**
  * 获取列表
-*/
+ */
 export function getMessages(page, limit = 30) {
-  return request.get("user/messages", {page: page, limit: limit});
+    return request.get("user/messages", {
+        page: page,
+        limit: limit
+    });
 }
 
 /**
  * 已读/未读 标记 0 未读 1已读
-*/
+ */
 export function readMessages(ids) {
-  return request.post("user/messages", {ids: ids, read: 1});
+    return request.post("user/messages", {
+        ids: ids,
+        read: 1
+    });
 }
 
 /**
  * 删除
-*/
+ */
 export function delMessages(ids) {
-  return request.post("user/messages/del", {ids: ids});
-}
+    return request.post("user/messages/del", {
+        ids: ids
+    });
+}

+ 18 - 12
view/xcx/api/mine.js

@@ -1,36 +1,42 @@
 import request from "./../utils/request.js";
 /**
  * 黑洞矿井相关接口
- * 
-*/
+ */
 
 export function getMineStatus() {
-  return request.get('coin/status', {})
+    return request.get('coin/status', {})
 }
+
 /**
  * 启动
-*/
+ */
 export function bootCoin() {
-  return request.post("coin/boot");
+    return request.post("coin/boot");
 }
 
 /**
  * 历史记录
-*/
+ */
 export function coinHistory(page = 1, limit = 30) {
-  return request.get("coin/history?page=" + page + "&limit=" + limit);
+    return request.get("coin/history?page=" + page + "&limit=" + limit);
 }
 
 /**
  * 更新钱包地址
-*/
+ */
 export function coinAddress(address, symbol = "doge") {
-  return request.post("coin/addr", { symbol: symbol, addr: address });
+    return request.post("coin/addr", {
+        symbol: symbol,
+        addr: address
+    });
 }
 
 /**
  * 提币
-*/
+ */
 export function coinTransfer(amount, symbol = "doge") {
-  return request.post("coin/transfer", { symbol: symbol, amount: amount });
-}
+    return request.post("coin/transfer", {
+        symbol: symbol,
+        amount: amount
+    });
+}

+ 78 - 71
view/xcx/api/order.js

@@ -1,16 +1,13 @@
 import request from "./../utils/request.js";
 /**
- * 
  * 订单相关接口
- * 
-*/
+ */
 
 /**
  * 获取购物车列表
- * 
  */
 export function getCartList() {
-  return request.get("cart/list");
+    return request.get("cart/list");
 }
 
 /**
@@ -18,169 +15,179 @@ export function getCartList() {
  * @param numType boolean true 购物车数量,false=购物车产品数量
  */
 export function getCartCounts(numType) {
-  return request.get("cart/count", { numType: numType === undefined ? true : numType });
+    return request.get("cart/count", {
+        numType: numType === undefined ? true : numType
+    });
 }
 
-
 /**
  * 修改购物车数量
  * @param int cartId  购物车id
  * @param int number 修改数量
  */
 export function changeCartNum(cartId, number) {
-  return request.post("cart/num", { id: cartId, number: number });
+    return request.post("cart/num", {
+        id: cartId,
+        number: number
+    });
 }
 
 /**
  * 清除购物车
  * @param object ids join(',') 切割成字符串
-*/
-export function cartDel(ids){
-  if (typeof id === 'object') 
-    ids = ids.join(',');
-  return request.post('cart/del', { ids: ids});
+ */
+export function cartDel(ids) {
+    if (typeof id === 'object')
+        ids = ids.join(',');
+    return request.post('cart/del', {
+        ids: ids
+    });
 }
 
 /**
  * 订单列表
  * @param object data
-*/
-export function getOrderList(data){
-  return request.get('order/list',data);
+ */
+export function getOrderList(data) {
+    return request.get('order/list', data);
 }
 
 /**
  * 订单确认获取订单详细信息
  * @param string cartId
-*/
-export function orderConfirm(cartId){
-  return request.post('order/confirm', { cartId: cartId});
+ */
+export function orderConfirm(cartId) {
+    return request.post('order/confirm', {
+        cartId: cartId
+    });
 }
 
 /**
  * 再次下单
  * @param string uni
- * 
-*/
-export function orderAgain(uni){
-  return request.post('order/again',{uni:uni});
+ */
+export function orderAgain(uni) {
+    return request.post('order/again', {
+        uni: uni
+    });
 }
 
 /**
  * 订单支付
  * @param object data
-*/
-export function orderPay(data){
-  return request.post('order/pay',data);
+ */
+export function orderPay(data) {
+    return request.post('order/pay', data);
 }
 
 /**
  * 订单详情
  * @param string uni 
-*/
-export function getOrderDetail(uni){
-  return request.get('order/v2/detail/'+uni);
+ */
+export function getOrderDetail(uni) {
+    return request.get('order/v2/detail/' + uni);
 }
 
 /**
  * 删除已完成订单
  * @param string uni
- * 
-*/
-export function orderDel(uni){
-  return request.post('order/del',{uni:uni});
+ */
+export function orderDel(uni) {
+    return request.post('order/del', {
+        uni: uni
+    });
 }
 
 /**
  * 订单收货
  * @param string uni
- * 
-*/
-export function orderTake(uni){
-  return request.post('order/take',{uni:uni});
+ */
+export function orderTake(uni) {
+    return request.post('order/take', {
+        uni: uni
+    });
 }
 
 /**
  * 订单查看物流
  * @param string uni
-*/
-export function orderExpress(uni){
-  return request.get('order/express/'+uni);
+ */
+export function orderExpress(uni) {
+    return request.get('order/express/' + uni);
 }
 
 /**
  * 订单评价
  * @param object data
- * 
-*/
-export function orderComment(data){
-  return request.post('order/comment',data);
+ */
+export function orderComment(data) {
+    return request.post('order/comment', data);
 }
 
 /**
  * 订单取消
  * @param string id
- * 
-*/
-export function orderCancel(id){
-  return request.post('order/cancel',{id:id});
+ */
+export function orderCancel(id) {
+    return request.post('order/cancel', {
+        id: id
+    });
 }
 
 /**
  * 订单产品信息
  * @param string unique 
-*/
-export function orderProduct(unique){
-  return request.post('order/product', { unique: unique});
+ */
+export function orderProduct(unique) {
+    return request.post('order/product', {
+        unique: unique
+    });
 }
 
 /**
  * 订单退款审核
  * @param object data
-*/
-export function orderRefundVerify(data){
-  return request.post('order/refund/verify',data);
+ */
+export function orderRefundVerify(data) {
+    return request.post('order/refund/verify', data);
 }
 
 /**
  * 获取退款理由
- * 
-*/
-export function ordeRefundReason(){
-  return request.get('order/refund/reason');
+ */
+export function ordeRefundReason() {
+    return request.get('order/refund/reason');
 }
 
 /**
  * 订单统计数据
-*/
-export function orderData(){
-  return request.get('order/data')
+ */
+export function orderData() {
+    return request.get('order/data')
 }
 
 /**
  * 获取当前金额能使用的优惠卷
  * @param string price
- * 
-*/
-export function getCouponsOrderPrice(price, data){
-  return request.get('coupons/order/' + price, data)
+ */
+export function getCouponsOrderPrice(price, data) {
+    return request.get('coupons/order/' + price, data)
 }
 
 /**
  * 订单创建
  * @param string key
  * @param object data
- * 
-*/
-export function orderCreate(key,data){
-  return request.post('order/v2/create/'+key,data);
+ */
+export function orderCreate(key, data) {
+    return request.post('order/v2/create/' + key, data);
 }
 /**
  * 订单查询物流信息
  * @returns {*}
  */
 export function express(uni) {
-  return request.get("order/express/" + uni);
+    return request.get("order/express/" + uni);
 }
 
 /**
@@ -190,5 +197,5 @@ export function express(uni) {
  * @returns {*}
  */
 export function postOrderComputed(key, data) {
-  return request.post("/order/v2/computed/" + key, data);
+    return request.post("/order/v2/computed/" + key, data);
 }

+ 66 - 52
view/xcx/api/store.js

@@ -1,35 +1,33 @@
 import request from "./../utils/request.js";
 /**
- * 
  * 产品相关接口
- * 
-*/
+ */
 
 /**
  * 获取推荐产品
- * 
  */
-export function getProductHot(page,limit) {
-  return request.get("product/hot", { 
-    page: page === undefined ? 1 : page, 
-    limit:limit === undefined ? 4 :limit
-  },{noAuth:true});
+export function getProductHot(page, limit) {
+    return request.get("product/hot", {
+        page: page === undefined ? 1 : page,
+        limit: limit === undefined ? 4 : limit
+    }, {
+        noAuth: true
+    });
 }
 
 /**
  * 购车添加
- * 
-*/
+ */
 export function postCartAdd(data) {
-  return request.post('cart/add', data);
+    return request.post('cart/add', data);
 }
 
 /**
  * 获取收藏列表
  * @param object data
-*/
+ */
 export function getCollectUserList(data) {
-  return request.get('collect/user', data)
+    return request.get('collect/user', data)
 }
 
 /**
@@ -37,100 +35,116 @@ export function getCollectUserList(data) {
  * 
  * @param object id  产品编号 join(',') 切割成字符串
  * @param string category 
-*/
+ */
 export function collectAll(id, category) {
-  return request.post('collect/all', { id: id, category: category === undefined ? 'product' : category });
+    return request.post('collect/all', {
+        id: id,
+        category: category === undefined ? 'product' : category
+    });
 }
 
 /**
  * 删除收藏产品
  * @param int id
  * @param string category product=普通产品,product_seckill=秒杀产品
-*/
+ */
 export function collectDel(id, category) {
-  return request.post('collect/del', { id: id, category: category === undefined ? 'product' : category });
+    return request.post('collect/del', {
+        id: id,
+        category: category === undefined ? 'product' : category
+    });
 }
 
 /**
  * 添加收藏
  * @param int id
  * @param string category product=普通产品,product_seckill=秒杀产品
-*/
-export function collectAdd(id, category){
-  return request.post('collect/add', { id: id, 'product': category === undefined ? 'product' : category });
+ */
+export function collectAdd(id, category) {
+    return request.post('collect/add', {
+        id: id,
+        'product': category === undefined ? 'product' : category
+    });
 }
 
 /**
  * 获取产品详情
  * @param int id
- * 
-*/
-export function getProductDetail(id){
-  return request.get('product/detail/' + id, {}, { noAuth : true });
+ */
+export function getProductDetail(id) {
+    return request.get('product/detail/' + id, {}, {
+        noAuth: true
+    });
 }
 
 /**
  * 产品分享二维码 推广员
  * @param int id
-*/
-export function getProductCode(id){
-  return request.get('product/code/' + id, { user_type:'routine'});
+ */
+export function getProductCode(id) {
+    return request.get('product/code/' + id, {
+        user_type: 'routine'
+    });
 }
 
 /**
  * 获取产品评论
  * @param int id
  * @param object data
- * 
-*/
-export function getReplyList(id,data){
-  return request.get('reply/list/'+id,data)
+ */
+export function getReplyList(id, data) {
+    return request.get('reply/list/' + id, data)
 }
 
 /**
  * 产品评价数量和好评度
  * @param int id
-*/
-export function getReplyConfig(id){
-  return request.get('reply/config/'+id);
-} 
+ */
+export function getReplyConfig(id) {
+    return request.get('reply/config/' + id);
+}
 
 /**
  * 获取分类列表
- * 
-*/
-export function getCategoryList(){
-  return request.get('category', {}, { noAuth:true})
+ */
+export function getCategoryList() {
+    return request.get('category', {}, {
+        noAuth: true
+    })
 }
 
 /**
  * 获取产品列表
  * @param object data
-*/
-export function getProductslist(data){
-  return request.get('products',data,{noAuth:true});
+ */
+export function getProductslist(data) {
+    return request.get('products', data, {
+        noAuth: true
+    });
 }
 
 /**
  * 首页产品的轮播图和产品信息
  * @param int type 
- * 
-*/
-export function getGroomList(type,data){
-  return request.get('groom/list/'+type,data,{noAuth:true});
+ */
+export function getGroomList(type, data) {
+    return request.get('groom/list/' + type, data, {
+        noAuth: true
+    });
 }
 
 /**
  * 获取搜索关键字获取
- * 
-*/
-export function getSearchKeyword(){
-  return request.get('search/keyword',{},{noAuth:true});
+ */
+export function getSearchKeyword() {
+    return request.get('search/keyword', {}, {
+        noAuth: true
+    });
 }
 /**
  * 门店列表
  * @returns {*}
  */
 export function storeListApi(data) {
-  return request.get("store_list", data);
+    return request.get("store_list", data);
 }

+ 131 - 121
view/xcx/api/user.js

@@ -1,278 +1,288 @@
 import request from "./../utils/request.js";
 /**
- * 
  * 用户相关接口
- * 
-*/
+ */
 
 /**
  * 小程序用户登录
  * @param data object 小程序用户登陆信息
  */
 export function login(data) {
-  return request.post("wechat/mp_auth", data, { noAuth : true });
+    return request.post("wechat/mp_auth", data, {
+        noAuth: true
+    });
 }
 
+/**
+ * 利用 code 来登录
+ */
+export function simple_login(data) {
+
+}
+
+/**
+ * 提交加密的用户信息用于注册或刷新资料
+ */
+export function login_with_userinfo(data) {
+
+}
 
 /**
  * 获取用户中心菜单
- *
  */
 export function getMenuList() {
-  return request.get("menu/user");
+    return request.get("menu/user");
 }
 
 /**
  * 获取用户信息
- * 
-*/
-export function getUserInfo(){
-  return request.get('user');
+ */
+export function getUserInfo() {
+    return request.get('user');
 }
 
 /**
  * 修改用户信息
  * @param object
-*/
-export function userEdit(data){
-  return request.post('user/edit',data);
+ */
+export function userEdit(data) {
+    return request.post('user/edit', data);
 }
 
 
 /**
  * 会员等级列表
- * 
-*/
-export function userLevelGrade(){
-  return request.get('user/level/grade');
+ */
+export function userLevelGrade() {
+    return request.get('user/level/grade');
 }
 
 /**
  * 获取某个等级任务
  * @param int id 任务id
-*/
-export function userLevelTask(id){
-  return request.get('user/level/task/'+id);
+ */
+export function userLevelTask(id) {
+    return request.get('user/level/task/' + id);
 }
 
 /**
  * 检查用户是否可以成为会员
- * 
-*/
-export function userLevelDetection(){
-  return request.get('user/level/detection');
+ */
+export function userLevelDetection() {
+    return request.get('user/level/detection');
 }
 
 /**
  * 获取分销海报图片
- * 
-*/
-export function spreadBanner(){
-  return request.get('spread/banner',{type:1});
+ */
+export function spreadBanner() {
+    return request.get('spread/banner', {
+        type: 1
+    });
 }
 
 /**
- *
  * 获取推广用户一级和二级
  * @param object data
-*/
-export function spreadPeople(data){
-  return request.post('spread/people',data);
+ */
+export function spreadPeople(data) {
+    return request.post('spread/people', data);
 }
 
 /**
- * 
  * 推广佣金明细
  * @param int type 
  * @param object data
-*/
-export function spreadCommission(type,data){
-  return request.get('spread/commission/'+type,data);
+ */
+export function spreadCommission(type, data) {
+    return request.get('spread/commission/' + type, data);
 }
 
 /**
- * 
  * 推广佣金/提现总和
  * @param int type
-*/
-export function spreadCount(type){
-  return request.get('spread/count/'+type);
+ */
+export function spreadCount(type) {
+    return request.get('spread/count/' + type);
 }
 
 /**
- * 
  * 推广订单
  * @param object data
-*/
-export function spreadOrder(data){
-  return request.post('spread/order',data);
+ */
+export function spreadOrder(data) {
+    return request.post('spread/order', data);
 }
 
 /**
  * 提现申请
  * @param object data
-*/
-export function extractCash(data){
-  return request.post('extract/cash',data)
+ */
+export function extractCash(data) {
+    return request.post('extract/cash', data)
 }
 
 /**
  * 提现银行/提现最低金额
- * 
-*/
-export function extractBank(){
-  return request.get('extract/bank');
+ */
+export function extractBank() {
+    return request.get('extract/bank');
 }
 
 /**
  * 活动状态
- * 
-*/
-export function userActivity(){
-  return request.get('user/activity');
+ */
+export function userActivity() {
+    return request.get('user/activity');
 }
 
 /**
  * 小程序充值
- * 
-*/
-export function rechargeRoutine(data){
-  return request.post('recharge/routine',data)
+ */
+export function rechargeRoutine(data) {
+    return request.post('recharge/routine', data)
 }
 
 /**
- * 
  * 地址列表
  * @param object data
-*/
-export function getAddressList(data){
-  return request.get('address/list',data);
+ */
+export function getAddressList(data) {
+    return request.get('address/list', data);
 }
 
 /**
  * 设置默认地址
  * @param int id
-*/
-export function setAddressDefault(id){
-  return request.post('address/default/set',{id:id})
+ */
+export function setAddressDefault(id) {
+    return request.post('address/default/set', {
+        id: id
+    })
 }
 
 /**
  * 获取默认地址
- * 
-*/
-export function getAddressDefault(){
-  return request.get('address/default');
+ */
+export function getAddressDefault() {
+    return request.get('address/default');
 }
+
 /**
  * 删除地址
  * @param int id
- * 
-*/
-export function delAddress(id){
-  return request.post('address/del',{id:id})
+ */
+export function delAddress(id) {
+    return request.post('address/del', {
+        id: id
+    })
 }
 
 /**
  * 修改 添加地址
  * @param object data
-*/
-export function editAddress(data){
-  return request.post('address/edit',data);
+ */
+export function editAddress(data) {
+    return request.post('address/edit', data);
 }
 
 /**
  * 获取单个地址
  * @param int id 
-*/
-export function getAddressDetail(id){
-  return request.get('address/detail/'+id);
+ */
+export function getAddressDetail(id) {
+    return request.get('address/detail/' + id);
 }
 
 /**
  * 设置用户分享
- * 
-*/
-export function userShare(){
-  return request.post('user/share');
+ */
+export function userShare() {
+    return request.post('user/share');
 }
 
 /**
  * 获取签到配置
- * 
-*/
-export function getSignConfig(){
-  return request.get('sign/config')
+ */
+export function getSignConfig() {
+    return request.get('sign/config')
 }
 
 /**
  * 获取签到列表
  * @param object data
-*/
-export function getSignList(data){
-  return request.get('sign/list',data);
+ */
+export function getSignList(data) {
+    return request.get('sign/list', data);
 }
 
 /**
  * 签到列表(年月)
  * @param object data
- * 
-*/
-export function getSignMonthList(data){
-  return request.get('sign/month',data)
+ */
+export function getSignMonthList(data) {
+    return request.get('sign/month', data)
 }
 
 /**
  * 用户签到
-*/
-export function setSignIntegral(){
-  return request.post('sign/integral')
+ */
+export function setSignIntegral() {
+    return request.post('sign/integral')
 }
-/*
+
+/**
  * 资金明细(types|0=全部,1=消费,2=充值,3=返佣,4=提现)
- * */
+ */
 export function getCommissionInfo(q, types) {
-  return request.get("spread/commission/" + types, q);
+    return request.get("spread/commission/" + types, q);
 }
-/*
+
+/**
  * 签到用户信息
- * */
+ */
 export function postSignUser(sign) {
-  return request.post("sign/user", sign);
+    return request.post("sign/user", sign);
 }
-/*
+
+/**
  * 积分记录
- * */
+ */
 export function getIntegralList(q) {
-  return request.get("integral/list", q);
+    return request.get("integral/list", q);
 }
-/*
+
+/**
  * 点击领取优惠券
- * */
+ */
 export function getCouponReceive(couponId) {
-  return request.post("coupon/receive", couponId);
+    return request.post("coupon/receive", couponId);
 }
-/*
+
+/**
  * 领取优惠券列表
- * */
+ */
 export function getCoupon(q) {
-  return request.get("coupons", q);
+    return request.get("coupons", q);
 }
-/*
+
+/**
  * 获取推广人排行
- * */
+ */
 export function getRankList(q) {
-  return request.get("rank", q);
+    return request.get("rank", q);
 }
-/*
+
+/**
  * 获取佣金排名
- * */
+ */
 export function getBrokerageRank(q) {
-  return request.get("brokerage_rank", q);
+    return request.get("brokerage_rank", q);
 }
+
 /**
  * 充值金额选择
-*/
+ */
 export function getRechargeApi() {
-  return request.get('recharge/index')
+    return request.get('recharge/index')
 }

+ 141 - 134
view/xcx/app.js

@@ -1,158 +1,165 @@
-import { HTTP_REQUEST_URL, CACHE_USERINFO, CACHE_TOKEN, CACHE_EXPIRES_TIME } from './config.js';
+import {
+    HTTP_REQUEST_URL,
+    CACHE_USERINFO,
+    CACHE_TOKEN,
+    CACHE_EXPIRES_TIME
+} from './config.js';
 import Server from './utils/Server.js';
 import util from './utils/util.js';
 
 App({
-	onLaunch: function (option) {
-    	if (HTTP_REQUEST_URL=='') {
-      		console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
-      		return false;
-    	}
-    	let that = this;
-    	let token = wx.getStorageSync(CACHE_TOKEN);
-    	let expiresTime = wx.getStorageSync(CACHE_EXPIRES_TIME);
-    	let userInfo = wx.getStorageSync(CACHE_USERINFO);
-    	this.globalData.isLog = !!userInfo && util.isLoginValid(token, expiresTime, true);
-    	if (this.globalData.isLog) {
-      		this.globalData.token = token;
-      		this.globalData.expiresTime = expiresTime;
-      		this.globalData.userInfo = userInfo ? JSON.parse(userInfo) : {};
-    	}
-    	if (option.query.hasOwnProperty('scene')){
-      		switch (option.scene) {
-        		//扫描小程序码
-        		case 1047:
-        		  that.globalData.code = option.query.scene;
-        		  break;
-        		//长按图片识别小程序码
-        		case 1048:
-        		  that.globalData.code = option.query.scene;
-        		  break;
-        		//手机相册选取小程序码
-        		case 1049:
-        		  that.globalData.code = option.query.scene;
-        		  break;
-        		//直接进入小程序
-        		case 1001:
-        		  that.globalData.spid = option.query.scene;
-        		  break;
-      		} // switch
-		} // if
-		
-    	// 获取导航高度;
-    	wx.getSystemInfo({
-      		success: res => {
-        		//导航高度
-        		this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
+    onLaunch: function (option) {
+        if (HTTP_REQUEST_URL == '') {
+            console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
+            return false;
+        }
+        let that = this;
+        let token = wx.getStorageSync(CACHE_TOKEN);
+        let expiresTime = wx.getStorageSync(CACHE_EXPIRES_TIME);
+        let userInfo = wx.getStorageSync(CACHE_USERINFO);
+        this.globalData.isLog = !!userInfo && util.isLoginValid(token, expiresTime, true);
+        if (this.globalData.isLog) {
+            this.globalData.token = token;
+            this.globalData.expiresTime = expiresTime;
+            this.globalData.userInfo = userInfo ? JSON.parse(userInfo) : {};
+        }
+        if (option.query.hasOwnProperty('scene')) {
+            switch (option.scene) {
+                //扫描小程序码
+                case 1047:
+                    that.globalData.code = option.query.scene;
+                    break;
+                    //长按图片识别小程序码
+                case 1048:
+                    that.globalData.code = option.query.scene;
+                    break;
+                    //手机相册选取小程序码
+                case 1049:
+                    that.globalData.code = option.query.scene;
+                    break;
+                    //直接进入小程序
+                case 1001:
+                    that.globalData.spid = option.query.scene;
+                    break;
+            } // switch
+        } // if
 
-        		var model = res.model;
-				if (/iphone\sx/i.test(model) || 
-					(/iphone/i.test(model) && /unknown/.test(model)) || 
-					/iphone\s11/i.test(model)) {
-            		that.globalData.isFixed = true;
-        		} else {
-            		that.globalData.isFixed = false;
-        		}
-			}, 
-			fail(err) {}
-    	});
-    	const updateManager = wx.getUpdateManager();
+        // 获取导航高度;
+        wx.getSystemInfo({
+            success: res => {
+                //导航高度
+                this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
 
-    	updateManager.onCheckForUpdate(function (res) {
-      		// 请求完新版本信息的回调
-    	})
+                var model = res.model;
+                if (/iphone\sx/i.test(model) ||
+                    (/iphone/i.test(model) && /unknown/.test(model)) ||
+                    /iphone\s11/i.test(model)) {
+                    that.globalData.isFixed = true;
+                } else {
+                    that.globalData.isFixed = false;
+                }
+            },
+            fail(err) {}
+        });
+        const updateManager = wx.getUpdateManager();
 
-    	updateManager.onUpdateReady(function () {
-      		wx.showModal({
-        		title: '更新提示',
-        		content: '新版本已经准备好,是否重启应用?',
-        		success: function (res) {
-        		  	if (res.confirm) {
-        		    	// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-        		    	updateManager.applyUpdate()
-        		  	}
-        		}
-      		})
-    	});
+        updateManager.onCheckForUpdate(function (res) {
+            // 请求完新版本信息的回调
+        })
 
-    	updateManager.onUpdateFailed(function () {
-      		return that.Tips({title:'新版本下载失败'});
-    	})
-    	//实例化聊天服务
-    	this.$chat = new Server(this);
-	}, // onLaunch
-	  
-	$chat:null,
-	  
-  	globalData: {
-    	navHeight: 0,
-    	routineStyle: '#ffffff',
-    	openPages: '',
-    	spid: 0,
-    	code:0,
-    	urlImages: '',
-    	url: HTTP_REQUEST_URL,
-    	token: '',
-    	isLog:false,    // 是否已登录
-    	expiresTime:0,
-    	MyMenus:[],
-    	userInfo:{},
-    	loginType:'routine',
-    	isFixed: false,
-    	unread: 0,  // 未读消息条数
-	},
-	  
-  	/**
-   	 * 聊天事件快捷注册
+        updateManager.onUpdateReady(function () {
+            wx.showModal({
+                title: '更新提示',
+                content: '新版本已经准备好,是否重启应用?',
+                success: function (res) {
+                    if (res.confirm) {
+                        // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+                        updateManager.applyUpdate()
+                    }
+                }
+            })
+        });
+
+        updateManager.onUpdateFailed(function () {
+            return that.Tips({
+                title: '新版本下载失败'
+            });
+        })
+        //实例化聊天服务
+        this.$chat = new Server(this);
+    }, // onLaunch
+
+    $chat: null,
+
+    globalData: {
+        navHeight: 0,
+        routineStyle: '#ffffff',
+        openPages: '',
+        spid: 0,
+        code: 0,
+        urlImages: '',
+        url: HTTP_REQUEST_URL,
+        token: '',
+        isLog: false, // 是否已登录
+        expiresTime: 0,
+        MyMenus: [],
+        userInfo: {},
+        loginType: 'routine',
+        isFixed: false,
+        unread: 0, // 未读消息条数
+    },
+
+    /**
+     * 聊天事件快捷注册
      */
-   	$on: function (name, action){
-    	this.$chat.$on(name,action);
-	},
+    $on: function (name, action) {
+        this.$chat.$on(name, action);
+    },
 
-	/**
-	 * 信息提示 + 跳转
-  	 * @param object opt {title:'提示语',icon:''} | url
+    /**
+     * 信息提示 + 跳转
+     * @param object opt {title:'提示语',icon:''} | url
      * @param object to_url 跳转url 有5种跳转方式 {tab:1-5,url:跳转地址}
-	 */
-  	Tips: function (opt, to_url) { 
-    	return util.Tips(opt, to_url);
-  	},
-  	/**
+     */
+    Tips: function (opt, to_url) {
+        return util.Tips(opt, to_url);
+    },
+    /**
      * 快捷调取助手函数
      */
-  	help:function() {
-    	return util.$h;
-  	},
+    help: function () {
+        return util.$h;
+    },
 
-  	setUnread: function(newVal) {
-    	this.globalData.unread = newVal
-    	this.updateUnread();
-  	},
+    setUnread: function (newVal) {
+        this.globalData.unread = newVal
+        this.updateUnread();
+    },
 
-  	/**
+    /**
      * update unread message tip
      * @param {int} newval 
      */
-  	updateUnread: function() {
-    	if (this.globalData.unread != undefined && this.globalData.unread > 0) {
-      		wx.setTabBarBadge({
-        		index: 2,
-        		text: this.globalData.unread.toString(),
-      		});
-    	} else {
-      		wx.removeTabBarBadge({
-        		index: 2,
-      		});
-    	}
-  	}, // updateUnread
+    updateUnread: function () {
+        if (this.globalData.unread != undefined && this.globalData.unread > 0) {
+            wx.setTabBarBadge({
+                index: 2,
+                text: this.globalData.unread.toString(),
+            });
+        } else {
+            wx.removeTabBarBadge({
+                index: 2,
+            });
+        }
+    }, // updateUnread
 
-  	/**
+    /**
      * 合并数组
      * @param array list 请求返回数据
      * @param array sp 原始数组
      * @return array
      */
-  	SplitArray: function (list, sp) { 
-		  return util.SplitArray(list, sp)
-	},
-}) // App
+    SplitArray: function (list, sp) {
+        return util.SplitArray(list, sp)
+    },
+}) // App

+ 151 - 153
view/xcx/app.json

@@ -1,156 +1,154 @@
 {
-  "pages": [
-    "pages/index/index",
-    "pages/goods_cate/goods_cate",
-    "pages/order_details/index",
-    "pages/user_sgin/index",
-    "pages/user/user",
-    "pages/user_get_coupon/index",
-    "pages/order_confirm/index",
-    "pages/goods_list/goods_list",
-    "pages/user_coupon/index",
-    "pages/goods_comment_list/index",
-    "pages/user_goods_collection/index",
-    "pages/user_address_list/index",
-    "pages/news_list/index",
-    "pages/user_phone/index",
-    "pages/user_pwd_edit/index",
-    "pages/goods_search/index",
-    "pages/user_vip/index",
-    "pages/user_license/license",
-    "pages/user_spread_money/index",
-    "pages/user_integral/index",
-    "pages/user_bill/index",
-    "pages/user_money/index",
-    "pages/user_spread_user/index",
-    "pages/user_sgin_list/index",
-    "pages/order_list/index",
-    "pages/goods_details/index",
-    "pages/goods_details_store/index",
-    "pages/news_details/index",
-    "pages/promoter-list/index",
-    "pages/promoter-order/index",
-    "pages/cash-audit/index",
-    "pages/user_cash/index",
-    "pages/user_return_list/index",
-    "pages/goods_return/index",
-    "pages/goods_comment_con/index",
-    "pages/promotional-items/index",
-    "pages/first-new-product/index",
-    "pages/user_spread_code/index",
-    "pages/user_info/index",
-    "pages/order_pay_status/index",
-    "pages/goods_logistics/index",
-    "pages/user_address/index",
-    "pages/order_addcart/order_addcart",
-    "pages/user_payment/index",
-    "pages/order_cancellation/index",
-    "pages/commission_rank/index",
-    "pages/promoter_rank/index",
-    "components/navbar/index",
-    "components/recommend/index",
-    "components/share-red-packets/index",
-    "components/orderGoods/index",
-    "components/swipers/index",
-    "components/goodList/index",
-    "components/promotionGood/index",
-    "components/productConSwiper/index",
-    "components/userEvaluation/index",
-    "components/coupon-window/index",
-    "components/product-window/index",
-    "components/coupon-list-window/index",
-    "components/address-window/index",
-    "components/home/index",
-    "components/write-off/index",
-    "components/price-change/index",
-    "components/general-window/index",
-    "pages/message/index",
-    "pages/mine_rule/index",
-    "pages/leader_board/index",
-    "pages/message_details/index"
-  ],
-  "subPackages": [
-    {
-      "root": "pages/activity",
-      "name": "activity",
-      "pages": [
-        "goods_combination/index",
-        "goods_combination_details/index",
-        "goods_combination_status/index",
-        "goods_seckill_details/index",
-        "goods_seckill/index",
-        "goods_bargain_details/index",
-        "goods_bargain/index",
-        "poster-poster/index",
-        "user_goods_bargain_list/index"
-      ]
+    "pages": [
+        "pages/index/index",
+        "pages/goods_cate/goods_cate",
+        "pages/order_details/index",
+        "pages/user_sgin/index",
+        "pages/user/user",
+        "pages/user_get_coupon/index",
+        "pages/order_confirm/index",
+        "pages/goods_list/goods_list",
+        "pages/user_coupon/index",
+        "pages/goods_comment_list/index",
+        "pages/user_goods_collection/index",
+        "pages/user_address_list/index",
+        "pages/news_list/index",
+        "pages/user_phone/index",
+        "pages/user_pwd_edit/index",
+        "pages/goods_search/index",
+        "pages/user_vip/index",
+        "pages/user_license/license",
+        "pages/user_spread_money/index",
+        "pages/user_integral/index",
+        "pages/user_bill/index",
+        "pages/user_money/index",
+        "pages/user_spread_user/index",
+        "pages/user_sgin_list/index",
+        "pages/order_list/index",
+        "pages/goods_details/index",
+        "pages/goods_details_store/index",
+        "pages/news_details/index",
+        "pages/promoter-list/index",
+        "pages/promoter-order/index",
+        "pages/cash-audit/index",
+        "pages/user_cash/index",
+        "pages/user_return_list/index",
+        "pages/goods_return/index",
+        "pages/goods_comment_con/index",
+        "pages/promotional-items/index",
+        "pages/first-new-product/index",
+        "pages/user_spread_code/index",
+        "pages/user_info/index",
+        "pages/order_pay_status/index",
+        "pages/goods_logistics/index",
+        "pages/user_address/index",
+        "pages/order_addcart/order_addcart",
+        "pages/user_payment/index",
+        "pages/order_cancellation/index",
+        "pages/commission_rank/index",
+        "pages/promoter_rank/index",
+        "components/navbar/index",
+        "components/recommend/index",
+        "components/share-red-packets/index",
+        "components/orderGoods/index",
+        "components/swipers/index",
+        "components/goodList/index",
+        "components/promotionGood/index",
+        "components/productConSwiper/index",
+        "components/userEvaluation/index",
+        "components/coupon-window/index",
+        "components/product-window/index",
+        "components/coupon-list-window/index",
+        "components/address-window/index",
+        "components/home/index",
+        "components/write-off/index",
+        "components/price-change/index",
+        "components/general-window/index",
+        "pages/message/index",
+        "pages/mine_rule/index",
+        "pages/leader_board/index",
+        "pages/message_details/index"
+    ],
+    "subPackages": [{
+            "root": "pages/activity",
+            "name": "activity",
+            "pages": [
+                "goods_combination/index",
+                "goods_combination_details/index",
+                "goods_combination_status/index",
+                "goods_seckill_details/index",
+                "goods_seckill/index",
+                "goods_bargain_details/index",
+                "goods_bargain/index",
+                "poster-poster/index",
+                "user_goods_bargain_list/index"
+            ]
+        },
+        {
+            "root": "pages/admin",
+            "name": "admin",
+            "pages": [
+                "order_cancellation/index",
+                "order/index",
+                "order_list/index",
+                "order_details/index",
+                "order_deliver/index",
+                "order_statistics/index",
+                "order_statistics_time/index"
+            ]
+        }
+    ],
+    "window": {
+        "backgroundTextStyle": "dark",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "WeChat",
+        "navigationBarTextStyle": "black",
+        "navigationStyle": "custom"
     },
-    {
-      "root": "pages/admin",
-      "name": "admin",
-      "pages": [
-        "order_cancellation/index",
-        "order/index",
-        "order_list/index",
-        "order_details/index",
-        "order_deliver/index",
-        "order_statistics/index",
-        "order_statistics_time/index"
-      ]
-    }
-  ],
-  "window": {
-    "backgroundTextStyle": "dark",
-    "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "WeChat",
-    "navigationBarTextStyle": "black",
-    "navigationStyle": "custom"
-  },
-  "tabBar": {
-    "backgroundColor": "#ffffff",
-    "color": "#282828",
-    "selectedColor": "#e93323",
-    "borderStyle": "white",
-    "list": [
-      {
-        "pagePath": "pages/index/index",
-        "iconPath": "images/0-001.png",
-        "selectedIconPath": "images/0-002.png",
-        "text": "活动"
-      },
-      {
-        "pagePath": "pages/user_money/index",
-        "iconPath": "images/6-001.png",
-        "selectedIconPath": "images/6-002.png",
-        "text": "钱包"
-      },
-      {
-        "pagePath": "pages/message/index",
-        "iconPath": "images/5-001.png",
-        "selectedIconPath": "images/5-002.png",
-        "text": "消息"
-      },
-      {
-        "pagePath": "pages/order_addcart/order_addcart",
-        "iconPath": "images/3-001.png",
-        "selectedIconPath": "images/3-002.png",
-        "text": "购物车"
-      },
-      {
-        "pagePath": "pages/user/user",
-        "iconPath": "images/4-001.png",
-        "selectedIconPath": "images/4-002.png",
-        "text": "我的"
-      }
-    ]
-  },
-  "permission": {
-    "scope.userLocation": {
-      "desc": "你的位置信息将用于获取附近门店"
-    }
-  },
-  "requiredBackgroundModes": [
-    "location"
-  ],
-  "sitemapLocation": "sitemap.json"
+    "tabBar": {
+        "backgroundColor": "#ffffff",
+        "color": "#282828",
+        "selectedColor": "#e93323",
+        "borderStyle": "white",
+        "list": [{
+                "pagePath": "pages/index/index",
+                "iconPath": "images/0-001.png",
+                "selectedIconPath": "images/0-002.png",
+                "text": "活动"
+            },
+            {
+                "pagePath": "pages/user_money/index",
+                "iconPath": "images/6-001.png",
+                "selectedIconPath": "images/6-002.png",
+                "text": "钱包"
+            },
+            {
+                "pagePath": "pages/message/index",
+                "iconPath": "images/5-001.png",
+                "selectedIconPath": "images/5-002.png",
+                "text": "消息"
+            },
+            {
+                "pagePath": "pages/order_addcart/order_addcart",
+                "iconPath": "images/3-001.png",
+                "selectedIconPath": "images/3-002.png",
+                "text": "购物车"
+            },
+            {
+                "pagePath": "pages/user/user",
+                "iconPath": "images/4-001.png",
+                "selectedIconPath": "images/4-002.png",
+                "text": "我的"
+            }
+        ]
+    },
+    "permission": {
+        "scope.userLocation": {
+            "desc": "你的位置信息将用于获取附近门店"
+        }
+    },
+    "requiredBackgroundModes": [
+        "location"
+    ],
+    "sitemapLocation": "sitemap.json"
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
view/xcx/app.wxss


+ 73 - 49
view/xcx/components/address-window/index.js

@@ -1,58 +1,82 @@
-import { getAddressList } from '../../api/user.js';
+import {
+    getAddressList
+} from '../../api/user.js';
 
 var app = getApp();
+
 Component({
-  properties: {
-    //跳转url链接
-    pagesUrl:{
-      type:String,
-      value:'',
-    },
-    address:{
-      type: Object,
-      value:{
-        address:true,
-        addressId:0,
-      }
-    },
-    isLog:{
-      type:Boolean,
-      value:false,
+    properties: {
+        //跳转url链接
+        pagesUrl: {
+            type: String,
+            value: '',
+        },
+        address: {
+            type: Object,
+            value: {
+                address: true,
+                addressId: 0,
+            }
+        },
+        isLog: {
+            type: Boolean,
+            value: false,
+        },
     },
-  },
-  data: {
-    active: 0,
-    //地址列表
-    addressList:[],
-    is_loading:true,
-  },
-  attached: function () {
-    
-  },
-  methods: {
-    tapAddress: function (e) {
-      this.setData({ active: e.currentTarget.dataset.id });
-      this.triggerEvent('OnChangeAddress', e.currentTarget.dataset.addressid);
+    data: {
+        active: 0,
+        //地址列表
+        addressList: [],
+        is_loading: true,
     },
-    close: function () {
-      this.setData({ 'address.address': false });
-      this.triggerEvent('changeTextareaStatus');
-    },
-    goAddressPages:function(){
-      this.setData({ 'address.address': false });
-      this.triggerEvent('changeTextareaStatus');
-      wx.navigateTo({url: this.data.pagesUrl});
+
+    attached: function () {
+
     },
-    getAddressList:function(){
-      var that=this;
-      getAddressList({page:1,limit:5}).then(res=>{
-        var addressList = res.data;
-        //处理默认选中项
-        for (var i = 0, leng = addressList.length; i < leng; i++) {
-          if (addressList[i].id == that.data.address.addressId) that.setData({ active: i });
+
+    methods: {
+        tapAddress: function (e) {
+            this.setData({
+                active: e.currentTarget.dataset.id
+            });
+            this.triggerEvent('OnChangeAddress', e.currentTarget.dataset.addressid);
+        },
+
+        close: function () {
+            this.setData({
+                'address.address': false
+            });
+            this.triggerEvent('changeTextareaStatus');
+        },
+
+        goAddressPages: function () {
+            this.setData({
+                'address.address': false
+            });
+            this.triggerEvent('changeTextareaStatus');
+            wx.navigateTo({
+                url: this.data.pagesUrl
+            });
+        },
+        
+        getAddressList: function () {
+            var that = this;
+            getAddressList({
+                page: 1,
+                limit: 5
+            }).then(res => {
+                var addressList = res.data;
+                //处理默认选中项
+                for (var i = 0, leng = addressList.length; i < leng; i++) {
+                    if (addressList[i].id == that.data.address.addressId) that.setData({
+                        active: i
+                    });
+                }
+                that.setData({
+                    addressList: addressList,
+                    is_loading: false
+                });
+            })
         }
-        that.setData({ addressList: addressList,is_loading:false });
-      })
     }
-  }
 })

+ 2 - 2
view/xcx/components/address-window/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 19 - 15
view/xcx/components/address-window/index.wxml

@@ -1,17 +1,21 @@
 <view class="address-window {{address.address==true?'on':''}}">
-   <view class='title'>选择地址<text class='iconfont icon-guanbi' bindtap='close'></text></view>
-   <view class='list'>
-      <view class='item acea-row row-between-wrapper {{active==index?"font-color":""}}' wx:for="{{addressList}}" data-id='{{index}}' bindtap='tapAddress' wx:key='index' data-addressId="{{item.id}}">
-         <text class='iconfont icon-ditu {{active==index?"font-color":""}}'></text>
-         <view class='address'>
-            <view class='name {{active==index?"font-color":""}}'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
-            <view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
-         </view>
-         <text class='iconfont icon-complete{{active==index?" font-color":""}}'></text>
-      </view>
-   </view>
-   <!-- 无地址 -->
-   <view class='pictrue' wx:if="{{!is_loading && !addressList.length}}"><image src='/images/noAddress.png'></image></view>
-   <view class='addressBnt bg-color' bindtap='goAddressPages'>选择其地址</view>
+    <view class='title'>选择地址<text class='iconfont icon-guanbi' bindtap='close'></text></view>
+    <view class='list'>
+        <view class='item acea-row row-between-wrapper {{active==index?"font-color":""}}' wx:for="{{addressList}}"
+            data-id='{{index}}' bindtap='tapAddress' wx:key='index' data-addressId="{{item.id}}">
+            <text class='iconfont icon-ditu {{active==index?"font-color":""}}'></text>
+            <view class='address'>
+                <view class='name {{active==index?"font-color":""}}'>{{item.real_name}}<text
+                        class='phone'>{{item.phone}}</text></view>
+                <view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
+            </view>
+            <text class='iconfont icon-complete{{active==index?" font-color":""}}'></text>
+        </view>
+    </view>
+    <!-- 无地址 -->
+    <view class='pictrue' wx:if="{{!is_loading && !addressList.length}}">
+        <image src='/images/noAddress.png'></image>
+    </view>
+    <view class='addressBnt bg-color' bindtap='goAddressPages'>选择其地址</view>
 </view>
-<view class='mask' catchtouchmove="true"  hidden='{{address.address==false}}' bindtap='close'></view>
+<view class='mask' catchtouchmove="true" hidden='{{address.address==false}}' bindtap='close'></view>

+ 87 - 13
view/xcx/components/address-window/index.wxss

@@ -1,15 +1,89 @@
 @import '/app.wxss';
-.address-window{background-color:#fff;position:fixed;bottom:0;left:0;width:100%;z-index:101;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
-.address-window.on{transform:translate3d(0,0,0);}
-.address-window .title{font-size:32rpx;font-weight:bold;text-align:center;height:123rpx;line-height:123rpx;position:relative;}
-.address-window .title .iconfont{position:absolute;right:30rpx;color:#8a8a8a;font-size:35rpx;}
-.address-window .list .item{margin-left:30rpx;padding-right:30rpx;border-bottom:1px solid #eee;height:129rpx;font-size:25rpx;color:#333;}
-.address-window .list .item .iconfont{font-size:37rpx;color:#2c2c2c;}
-.address-window .list .item .iconfont.icon-complete{font-size:30rpx;color:#fff;}
-.address-window .list .item .address{width:560rpx;}
-.address-window .list .item .address .name{font-size:28rpx;font-weight:bold;color:#282828;margin-bottom:4rpx;}
-.address-window .list .item .address .name .phone{margin-left:18rpx;}
-.address-window .addressBnt{font-size:30rpx;font-weight:bold;color:#fff;width:690rpx;height:86rpx;border-radius:43rpx;text-align:center;line-height:86rpx;margin:85rpx auto;}
-.address-window .pictrue{width:414rpx;height:336rpx;margin:0 auto;}
-.address-window .pictrue image{width:100%;height:100%;}
 
+.address-window {
+    background-color: #fff;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    z-index: 101;
+    transform: translate3d(0, 100%, 0);
+    transition: all .3s cubic-bezier(.25, .5, .5, .9);
+}
+
+.address-window.on {
+    transform: translate3d(0, 0, 0);
+}
+
+.address-window .title {
+    font-size: 32rpx;
+    font-weight: bold;
+    text-align: center;
+    height: 123rpx;
+    line-height: 123rpx;
+    position: relative;
+}
+
+.address-window .title .iconfont {
+    position: absolute;
+    right: 30rpx;
+    color: #8a8a8a;
+    font-size: 35rpx;
+}
+
+.address-window .list .item {
+    margin-left: 30rpx;
+    padding-right: 30rpx;
+    border-bottom: 1px solid #eee;
+    height: 129rpx;
+    font-size: 25rpx;
+    color: #333;
+}
+
+.address-window .list .item .iconfont {
+    font-size: 37rpx;
+    color: #2c2c2c;
+}
+
+.address-window .list .item .iconfont.icon-complete {
+    font-size: 30rpx;
+    color: #fff;
+}
+
+.address-window .list .item .address {
+    width: 560rpx;
+}
+
+.address-window .list .item .address .name {
+    font-size: 28rpx;
+    font-weight: bold;
+    color: #282828;
+    margin-bottom: 4rpx;
+}
+
+.address-window .list .item .address .name .phone {
+    margin-left: 18rpx;
+}
+
+.address-window .addressBnt {
+    font-size: 30rpx;
+    font-weight: bold;
+    color: #fff;
+    width: 690rpx;
+    height: 86rpx;
+    border-radius: 43rpx;
+    text-align: center;
+    line-height: 86rpx;
+    margin: 85rpx auto;
+}
+
+.address-window .pictrue {
+    width: 414rpx;
+    height: 336rpx;
+    margin: 0 auto;
+}
+
+.address-window .pictrue image {
+    width: 100%;
+    height: 100%;
+}

+ 85 - 63
view/xcx/components/authorize/authorize.js

@@ -1,7 +1,15 @@
-import { CACHE_USERINFO, CACHE_TOKEN, CACHE_EXPIRES_TIME } from '../../config.js';
+import {
+    CACHE_USERINFO,
+    CACHE_TOKEN,
+    CACHE_EXPIRES_TIME
+} from '../../config.js';
 import Util from '../../utils/util.js';
-import { getLogo } from '../../api/api.js';
-import { login } from '../../api/user.js';
+import {
+    getLogo
+} from '../../api/api.js';
+import {
+    login
+} from '../../api/user.js';
 
 let app = getApp();
 
@@ -9,24 +17,24 @@ Component({
     properties: {
         // 当前授权窗口是否隐藏
         iShidden: {
-          type: Boolean,
-          value: true,
+            type: Boolean,
+            value: true,
         },
         // 是否自动登录
         isAuto: {
-          type: Boolean,
-          value: true,
+            type: Boolean,
+            value: true,
         },
         // 是否跳转到首页
-        isGoIndex:{
-          type: Boolean,
-          value:true,
+        isGoIndex: {
+            type: Boolean,
+            value: true,
         },
     }, // properties
 
     data: {
-        errorCount:0,
-        errorMaxNum:3,
+        errorCount: 0,
+        errorMaxNum: 3,
         code: null, // wx login code
         canIUseGetUserProfile: false, // 判断是否为最新获取用户信息函数
         canIUseGetUserInfo: false
@@ -35,10 +43,10 @@ Component({
     attached() {
         this.get_logo_url();
         this.setAuthStatus();
-	    if (wx.getUserProfile) {
-	        this.setData({
-	            canIUseGetUserProfile: true
-	        })
+        if (wx.getUserProfile) {
+            this.setData({
+                canIUseGetUserProfile: true
+            })
         }
         if (wx.getUserInfo) {
             this.setData({
@@ -50,15 +58,19 @@ Component({
     methods: {
         close() {
             let pages = getCurrentPages();
-            let currPage  = pages[pages.length - 1];
+            let currPage = pages[pages.length - 1];
             if (this.data.isGoIndex) {
-                wx.switchTab({url: '/pages/index/index'});
+                wx.switchTab({
+                    url: '/pages/index/index'
+                });
             } else {
                 this.setData({
-                  iShidden: true
+                    iShidden: true
                 });
-                if (currPage && currPage.data.iShidden != undefined){
-                  currPage.setData({ iShidden:true});
+                if (currPage && currPage.data.iShidden != undefined) {
+                    currPage.setData({
+                        iShidden: true
+                    });
                 }
             }
         }, // close()
@@ -66,11 +78,15 @@ Component({
         get_logo_url: function () {
             var that = this;
             if (wx.getStorageSync('logo_url')) {
-                return this.setData({ logo_url: wx.getStorageSync('logo_url') });
+                return this.setData({
+                    logo_url: wx.getStorageSync('logo_url')
+                });
             }
             getLogo().then(res => {
                 wx.setStorageSync('logo_url', res.data.logo_url);
-                that.setData({ logo_url: res.data.logo_url });
+                that.setData({
+                    logo_url: res.data.logo_url
+                });
             });
         }, // get_logo_url()
 
@@ -80,24 +96,34 @@ Component({
             Util.checkWxLogin().then((res) => {
                 let pages = getCurrentPages();
                 let currPage = pages[pages.length - 1];
-                if (currPage && currPage.data.iShidden != undefined) { 
-                    currPage.setData({ iShidden:true});
+                if (currPage && currPage.data.iShidden != undefined) {
+                    currPage.setData({
+                        iShidden: true
+                    });
                 }
                 if (res.isLogin) {
                     if (!Util.isLoginValid()) {
-                        return Promise.reject({ authSetting: true, msg: '用户token失效', userInfo: res.userInfo}  );
+                        return Promise.reject({
+                            authSetting: true,
+                            msg: '用户token失效',
+                            userInfo: res.userInfo
+                        });
                     }
                     that.triggerEvent('onLoadFun', app.globalData.userInfo);
                 } else {
-                    wx.showLoading({ title: '正在登录中' });
-                    that.setUserInfo(res.userInfo,true);
+                    wx.showLoading({
+                        title: '正在登录中'
+                    });
+                    that.setUserInfo(res.userInfo, true);
                 }
             }).catch(res => {
                 if (res.authSetting === false) {
                     //没有授权不会自动弹出登录框
                     if (that.data.isAuto === false) return;
                     //自动弹出授权
-                    that.setData({ iShidden: false });
+                    that.setData({
+                        iShidden: false
+                    });
                 } else if (res.authSetting) {
                     //授权后登录token失效了
                     that.setUserInfo(res.userInfo);
@@ -105,31 +131,13 @@ Component({
             })
         }, // setAuthStatus()
 
-        /**
-         * 封装 wx.getUserInfo()
-         */
-        wxGetUserInfo: function() {
-            return new Promise((resolve, reject) => {
-                wx.getUserInfo({
-                    lang: 'zh_CN',
-                    desc: '用于完善会员资料',
-                    success(res) {
-                        resolve(res);
-                    },
-                    fail(res){
-                        reject(res);
-                    }
-                })
-            });
-        },
-
         wxSilentLogin: function () {
             return new Promise((resolve, reject) => {
                 wx.login({
-                    success (res) {
+                    success(res) {
                         resolve(res.code)
                     },
-                    fail (err) {
+                    fail(err) {
                         reject(err)
                     }
                 })
@@ -137,9 +145,11 @@ Component({
         }, // wxSilentLogin
 
         // 获取用户信息
-    	agreeAndAuth() {
-  	        let that = this;
-            wx.showLoading({ title: '正在登录中' });
+        agreeAndAuth() {
+            let that = this;
+            wx.showLoading({
+                title: '正在登录中'
+            });
             let p1 = this.wxSilentLogin()
             let p2 = Util.wxGetUserProfile()
             Promise.all([p1, p2]).then((res) => {
@@ -151,16 +161,18 @@ Component({
                 console.log(err)
             })
         }, // agreeAndAuth
-    
+
         //授权
         setUserInfo(userInfo, isLogin) {
             let that = this;
-            wx.showLoading({ title: '正在登录中' });
+            wx.showLoading({
+                title: '正在登录中'
+            });
             if (isLogin) {
                 that.loginAuth(userInfo);
             } else {
-                Util.getAuthCode((res) => {
-                    Util.wxGetUserProfile().then(userInfo=>{
+                Util.wxLogin((res) => {
+                    Util.wxGetUserProfile().then(userInfo => {
                         userInfo.code = res.code;
                         that.loginAuth(userInfo);
                     }).catch(res => {
@@ -173,8 +185,8 @@ Component({
         // 从后台获取详细信息
         loginAuth: function (userInfo) {
             let that = this;
-            userInfo.spread_spid = app.globalData.spid;//获取推广人ID
-            userInfo.spread_code = app.globalData.code;//获取推广人分享二维码ID
+            userInfo.spread_spid = app.globalData.spid; //获取推广人ID
+            userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
             // 发送到后台
             login(userInfo).then(res => {
                 app.globalData.token = res.data.token;
@@ -185,20 +197,30 @@ Component({
                 wx.setStorageSync(CACHE_EXPIRES_TIME, res.data.expires_time);
                 wx.setStorageSync(CACHE_USERINFO, JSON.stringify(res.data.userInfo));
                 if (res.data.cache_key) {
-                    wx.setStorage({ key: 'cache_key', data: res.data.cache_key });
+                    wx.setStorage({
+                        key: 'cache_key',
+                        data: res.data.cache_key
+                    });
                 }
                 //取消登录提示
                 wx.hideLoading();
                 //关闭登录弹出窗口
-                that.setData({ iShidden: true, errorCount: 0 });
+                that.setData({
+                    iShidden: true,
+                    errorCount: 0
+                });
                 //执行登录完成回调
                 that.triggerEvent('onLoadFun', app.globalData.userInfo);
             }).catch((err) => {
                 wx.hideLoading();
                 that.data.errorCount++;
-                that.setData({ errorCount: that.data.errorCount });
+                that.setData({
+                    errorCount: that.data.errorCount
+                });
                 if (that.data.errorCount >= that.data.errorMaxNum) {
-                    Util.Tips({ title: err });
+                    Util.Tips({
+                        title: err
+                    });
                 } else {
                     that.setUserInfo(userInfo);
                 }
@@ -206,7 +228,7 @@ Component({
         }, // loginAuth()
 
         // 点击打开用户协议
-        onTabRegular: function() {
+        onTabRegular: function () {
             wx.navigateTo({
                 url: `/pages/user_license/license`
             })

+ 1 - 1
view/xcx/components/authorize/authorize.json

@@ -1,3 +1,3 @@
 {
-  "component":true
+    "component": true
 }

+ 14 - 12
view/xcx/components/authorize/authorize.wxml

@@ -1,16 +1,18 @@
 <!--pages/authorize/authorize.wxml-->
 <view class='Popup' hidden='{{iShidden}}'>
-   <image src='{{logo_url}}'></image>
-   <view class='title'>请授权并同意协议</view>
-   <view class='tip'>请授权微信头像,用户名等信息,并遵守
-      <a href='/pages/user_license/license' bindtap='onTabRegular'>《美天旺平台规则》</a>,
-      以便更好地为您服务。
-   </view>
-   <view class='bottom flex'>
-      <view class='item' bindtap='close'>随便逛逛</view>
-      <!-- 在高版本中获取用户信息已改成uni.getUserProfile-->
-	   <button class='item grant'  type="primary" wx:if="{{canIUseGetUserProfile}}" lang="zh_CN" bindtap="agreeAndAuth">同意并授权</button>
-	   <button class='item grant'  type="primary" wx:else open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="agreeAndAuth">同意并授权</button>
-   </view>
+    <image src='{{logo_url}}'></image>
+    <view class='title'>请授权并同意协议</view>
+    <view class='tip'>请授权微信头像,用户名等信息,并遵守
+        <a href='/pages/user_license/license' bindtap='onTabRegular'>《美天旺平台规则》</a>,
+        以便更好地为您服务。
+    </view>
+    <view class='bottom flex'>
+        <view class='item' bindtap='close'>随便逛逛</view>
+        <!-- 在高版本中获取用户信息已改成uni.getUserProfile-->
+        <button class='item grant' type="primary" wx:if="{{canIUseGetUserProfile}}" lang="zh_CN"
+            bindtap="agreeAndAuth">同意并授权</button>
+        <button class='item grant' type="primary" wx:else open-type="getUserInfo" lang="zh_CN"
+            bindgetuserinfo="agreeAndAuth">同意并授权</button>
+    </view>
 </view>
 <view class='mask' hidden='{{iShidden}}' catchtouchmove="true" bindtap='close'></view>

+ 77 - 12
view/xcx/components/authorize/authorize.wxss

@@ -1,13 +1,78 @@
 /* pages/authorize/authorize.wxss */
-@import "../../app.wxss"; 
-
-.Popup{width:500rpx;background-color:#fff;position:fixed;top:50%;left:50%;margin-left:-250rpx;transform:translateY(-50%);z-index:320;}
-.Popup image{width:150rpx;height:150rpx;margin:-67rpx auto 0 auto;display:block;border: 8rpx solid #fff;border-radius: 50%}
-.Popup .title{font-size:28rpx;color:#000;text-align:center;margin-top: 30rpx}
-.Popup .tip{font-size:22rpx;color:#555;padding:0 24rpx;margin-top:25rpx;}
-.Popup .tip a{color:rgb(243, 70, 70);}
-.Popup .bottom .item{width:50%;height:80rpx;background-color:#eeeeee;text-align:center;line-height:80rpx;font-size:24rpx;color:#666;margin-top:54rpx;}
-.Popup .bottom .item.on{width: 100%}
-.flex{display:flex;}
-.Popup .bottom .item.grant{font-size:28rpx;color:#fff;font-weight:bold;background-color:#e93323;border-radius:0;padding:0;}
-.mask{position:fixed;top:0;right:0;left:0;bottom:0;background-color:rgba(0,0,0,0.65);z-index:310;}
+@import "../../app.wxss";
+
+.Popup {
+    width: 500rpx;
+    background-color: #fff;
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    margin-left: -250rpx;
+    transform: translateY(-50%);
+    z-index: 320;
+}
+
+.Popup image {
+    width: 150rpx;
+    height: 150rpx;
+    margin: -67rpx auto 0 auto;
+    display: block;
+    border: 8rpx solid #fff;
+    border-radius: 50%
+}
+
+.Popup .title {
+    font-size: 28rpx;
+    color: #000;
+    text-align: center;
+    margin-top: 30rpx
+}
+
+.Popup .tip {
+    font-size: 22rpx;
+    color: #555;
+    padding: 0 24rpx;
+    margin-top: 25rpx;
+}
+
+.Popup .tip a {
+    color: rgb(243, 70, 70);
+}
+
+.Popup .bottom .item {
+    width: 50%;
+    height: 80rpx;
+    background-color: #eeeeee;
+    text-align: center;
+    line-height: 80rpx;
+    font-size: 24rpx;
+    color: #666;
+    margin-top: 54rpx;
+}
+
+.Popup .bottom .item.on {
+    width: 100%
+}
+
+.flex {
+    display: flex;
+}
+
+.Popup .bottom .item.grant {
+    font-size: 28rpx;
+    color: #fff;
+    font-weight: bold;
+    background-color: #e93323;
+    border-radius: 0;
+    padding: 0;
+}
+
+.mask {
+    position: fixed;
+    top: 0;
+    right: 0;
+    left: 0;
+    bottom: 0;
+    background-color: rgba(0, 0, 0, 0.65);
+    z-index: 310;
+}

+ 58 - 50
view/xcx/components/coupon-list-window/index.js

@@ -1,57 +1,65 @@
-import { setCouponReceive } from '../../api/api.js';
+import {
+    setCouponReceive
+} from '../../api/api.js';
+
 const app = getApp();
+
 Component({
-  properties: {
-    coupon: {
-      type: Object,
-      value:{
-        list:[],
-        statusTile:''
-      },
-    },
-    cartId: {
-      type: String,
-      value: '',
+    properties: {
+        coupon: {
+            type: Object,
+            value: {
+                list: [],
+                statusTile: ''
+            },
+        },
+        cartId: {
+            type: String,
+            value: '',
+        },
+        //打开状态 0=领取优惠券,1=使用优惠券
+        openType: {
+            type: Number,
+            value: 0,
+        }
     },
-    //打开状态 0=领取优惠券,1=使用优惠券
-    openType:{
-      type:Number,
-      value:0,
-    }
-  },
-  data: {
-  },
-  attached: function () {
-    console.log(this.data.cartId)
-  },
-  methods: {
 
-    close: function () {
-      this.triggerEvent('ChangCouponsClone');
-    },
+    data: {},
     
-    getCouponUser:function(e){
-      var that = this;
-      var id = e.currentTarget.dataset.id;
-      var index = e.currentTarget.dataset.index;
-      var list = that.data.coupon.list;
-      if (list[index].is_use == true && this.data.openType==0) return true;
-      switch (this.data.openType){
-        case 0:
-          //领取优惠券
-          setCouponReceive(id).then(res=>{
-            list[index].is_use = true;
-            that.setData({
-              ['coupon.list']: list
-            });
-            app.Tips({ title: '领取成功' });
-            that.triggerEvent('ChangCoupons', list[index]);
-          });
-        break;
-        case 1:
-          that.triggerEvent('ChangCoupons',index);
-        break;
-      }
+    attached: function () {
+        console.log(this.data.cartId)
     },
-  }
+    
+    methods: {
+
+        close: function () {
+            this.triggerEvent('ChangCouponsClone');
+        },
+
+        getCouponUser: function (e) {
+            var that = this;
+            var id = e.currentTarget.dataset.id;
+            var index = e.currentTarget.dataset.index;
+            var list = that.data.coupon.list;
+            if (list[index].is_use == true && this.data.openType == 0) return true;
+            switch (this.data.openType) {
+                case 0:
+                    //领取优惠券
+                    setCouponReceive(id).then(res => {
+                        list[index].is_use = true;
+                        that.setData({
+                            ['coupon.list']: list
+                        });
+                        app.Tips({
+                            title: '领取成功'
+                        });
+                        that.triggerEvent('ChangCoupons', list[index]);
+                    });
+                    break;
+                case 1:
+                    that.triggerEvent('ChangCoupons', index);
+                    break;
+            }
+        },
+    }
 })

+ 2 - 2
view/xcx/components/coupon-list-window/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 23 - 21
view/xcx/components/coupon-list-window/index.wxml

@@ -1,28 +1,30 @@
 <view class='coupon-list-window {{coupon.coupon==true?"on":""}}'>
     <view class='title'>优惠券<text class='iconfont icon-guanbi' bindtap='close'></text></view>
     <view class='coupon-list' wx:if="{{coupon.list.length}}">
-      <view class='item acea-row row-center-wrapper' wx:for="{{coupon.list}}" bindtap='getCouponUser' data-index='{{index}}' data-id="{{item.id}}" wx:key='index'>
-         <view class='money {{item.is_use?"moneyGray":""}} acea-row row-column row-center-wrapper'>
-            <view>¥<text class='num'>{{item.coupon_price}}</text></view>
-            <view class="pic-num">满{{item.use_min_price}}元可用</view>
-        </view>
-        <view class='text'>
-            <view class='condition line1'>
-                <span class='line-title {{item.is_use?"gray":""}}'  wx:if="{{item.type===0}}">通用劵</span>
-                <span class='line-title {{item.is_use?"gray":""}}' wx:elif="{{item.type===1}}">品类券</span>
-                <span class='line-title {{item.is_use?"gray":""}}' wx:else>商品券</span>
-                <span>{{item.title}}</span>
+        <view class='item acea-row row-center-wrapper' wx:for="{{coupon.list}}" bindtap='getCouponUser'
+            data-index='{{index}}' data-id="{{item.id}}" wx:key='index'>
+            <view class='money {{item.is_use?"moneyGray":""}} acea-row row-column row-center-wrapper'>
+                <view>¥<text class='num'>{{item.coupon_price}}</text></view>
+                <view class="pic-num">满{{item.use_min_price}}元可用</view>
             </view>
-            <view class='data acea-row row-between-wrapper'>
-              <view>{{item.start_time ? item.start_time+'-' : ''}}{{item.end_time}}</view>
-              <view class='bnt gray' wx:if="{{item.is_use}}">{{item.use_title || '已领取'}}</view>
-              <view class='bnt bg-color' wx:else>{{coupon.statusTile || '立即领取'}}</view>
+            <view class='text'>
+                <view class='condition line1'>
+                    <span class='line-title {{item.is_use?"gray":""}}' wx:if="{{item.type===0}}">通用劵</span>
+                    <span class='line-title {{item.is_use?"gray":""}}' wx:elif="{{item.type===1}}">品类券</span>
+                    <span class='line-title {{item.is_use?"gray":""}}' wx:else>商品券</span>
+                    <span>{{item.title}}</span>
+                </view>
+                <view class='data acea-row row-between-wrapper'>
+                    <view>{{item.start_time ? item.start_time+'-' : ''}}{{item.end_time}}</view>
+                    <view class='bnt gray' wx:if="{{item.is_use}}">{{item.use_title || '已领取'}}</view>
+                    <view class='bnt bg-color' wx:else>{{coupon.statusTile || '立即领取'}}</view>
+                </view>
             </view>
         </view>
-      </view>
-   </view>
-   <!-- 无优惠券 -->
-   <view class='pictrue' wx:else><image src='/images/noCoupon.png'></image></view>
+    </view>
+    <!-- 无优惠券 -->
+    <view class='pictrue' wx:else>
+        <image src='/images/noCoupon.png'></image>
+    </view>
 </view>
-<view class='mask' catchtouchmove="true" hidden='{{coupon.coupon==false}}' bindtap='close'></view>
-
+<view class='mask' catchtouchmove="true" hidden='{{coupon.coupon==false}}' bindtap='close'></view>

+ 79 - 24
view/xcx/components/coupon-list-window/index.wxss

@@ -1,26 +1,81 @@
 @import '/app.wxss';
-.coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:16rpx 16rpx 0 0;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);z-index: 1000}
-.coupon-list-window.on{transform:translate3d(0,0,0);}
-.coupon-list-window .title{height:124rpx;width:100%;text-align:center;line-height:124rpx;font-size:32rpx;font-weight:bold;position:relative;}
-.coupon-list-window .title .iconfont{position:absolute;right:30rpx;top:50%;transform:translateY(-50%);font-size:35rpx;color:#8a8a8a;font-weight:normal;width: 100rpx;display: block;text-align: right;}
-.coupon-list-window .coupon-list{margin:0 0 50rpx 0;height:550rpx;overflow:auto;}
-.coupon-list-window .pictrue{width:414rpx;height:336rpx;margin:0 auto 50rpx auto;}
-.coupon-list-window .pictrue image{width:100%;height:100%;}
-.pic-num{color: #fff;font-size: 24rpx;}
-.line-title{
-  width:90rpx;
-  padding: 0 10rpx;
-  box-sizing: border-box;
-  background:rgba(255,247,247,1);
-  border:1px solid rgba(232,51,35,1);
-  opacity:1;
-  border-radius:20rpx;
-  font-size:20rpx;
-  color: #E83323;
-  margin-right: 12rpx;
-}
-.line-title.gray{
-  border-color:#BBB;
-  color:#bbb;
-  background-color:#F5F5F5;
+
+.coupon-list-window {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    background-color: #f5f5f5;
+    border-radius: 16rpx 16rpx 0 0;
+    transform: translate3d(0, 100%, 0);
+    transition: all .3s cubic-bezier(.25, .5, .5, .9);
+    z-index: 1000
 }
+
+.coupon-list-window.on {
+    transform: translate3d(0, 0, 0);
+}
+
+.coupon-list-window .title {
+    height: 124rpx;
+    width: 100%;
+    text-align: center;
+    line-height: 124rpx;
+    font-size: 32rpx;
+    font-weight: bold;
+    position: relative;
+}
+
+.coupon-list-window .title .iconfont {
+    position: absolute;
+    right: 30rpx;
+    top: 50%;
+    transform: translateY(-50%);
+    font-size: 35rpx;
+    color: #8a8a8a;
+    font-weight: normal;
+    width: 100rpx;
+    display: block;
+    text-align: right;
+}
+
+.coupon-list-window .coupon-list {
+    margin: 0 0 50rpx 0;
+    height: 550rpx;
+    overflow: auto;
+}
+
+.coupon-list-window .pictrue {
+    width: 414rpx;
+    height: 336rpx;
+    margin: 0 auto 50rpx auto;
+}
+
+.coupon-list-window .pictrue image {
+    width: 100%;
+    height: 100%;
+}
+
+.pic-num {
+    color: #fff;
+    font-size: 24rpx;
+}
+
+.line-title {
+    width: 90rpx;
+    padding: 0 10rpx;
+    box-sizing: border-box;
+    background: rgba(255, 247, 247, 1);
+    border: 1px solid rgba(232, 51, 35, 1);
+    opacity: 1;
+    border-radius: 20rpx;
+    font-size: 20rpx;
+    color: #E83323;
+    margin-right: 12rpx;
+}
+
+.line-title.gray {
+    border-color: #BBB;
+    color: #bbb;
+    background-color: #F5F5F5;
+}

+ 19 - 19
view/xcx/components/coupon-window/index.js

@@ -1,24 +1,24 @@
 var app = getApp();
 Component({
-  properties: {
-    window:{
-      type: Boolean,
-      value: false,
+    properties: {
+        window: {
+            type: Boolean,
+            value: false,
+        },
+        couponList: {
+            type: Array,
+            value: [],
+        }
     },
-    couponList:{
-      type:Array,
-      value:[],
-    }
-  },
-  data: {
-  
-  },
-  attached: function () {
-  
-  },
-  methods: {
-    close:function(){
-      this.triggerEvent('onClose');
+    data: {
+
+    },
+    attached: function () {
+
+    },
+    methods: {
+        close: function () {
+            this.triggerEvent('onClose');
+        }
     }
-  }
 })

+ 1 - 1
view/xcx/components/coupon-window/index.json

@@ -1,3 +1,3 @@
 {
-  "usingComponents": {}
+    "usingComponents": {}
 }

+ 21 - 21
view/xcx/components/coupon-window/index.wxml

@@ -1,24 +1,24 @@
 <view class='coupon-window {{window==true?"on":""}}'>
-   <view class='couponWinList'>
-      <view class='item acea-row row-center-wrapper' wx:for="{{couponList}}" wx:key='index'>
-         <view class='money font-color acea-row row-column row-center-wrapper'>
-            <view>¥<text class='num'>{{item.coupon_price}}</text></view>
-            <view class="pic-num">满{{item.use_min_price}}元可用</view>
-         </view>
-         <view class="text acea-row row-between">
-            <view class='pic acea-row row-column row-center'>
-               <view class='name line1'>{{item.title}}</view>
-               <view>{{item.start_time ? item.start_time+'-' : ''}}{{item.end_time}}</view>
+    <view class='couponWinList'>
+        <view class='item acea-row row-center-wrapper' wx:for="{{couponList}}" wx:key='index'>
+            <view class='money font-color acea-row row-column row-center-wrapper'>
+                <view>¥<text class='num'>{{item.coupon_price}}</text></view>
+                <view class="pic-num">满{{item.use_min_price}}元可用</view>
             </view>
-            <view class="type" wx:if="{{item.type===0}}">通用劵</view>
-            <view class="type" wx:elif="{{item.type===1}}">品类券</view>
-            <view class="type" wx:else>商品券</view>
-         </view>
-      </view>
-   </view>
-   <view class='lid'>
-      <navigator hover-class='none' url='/pages/user_get_coupon/index' class='bnt font-color'>立即领取</navigator>
-      <view class='iconfont icon-guanbi3' bindtap='close'></view>
-   </view>
+            <view class="text acea-row row-between">
+                <view class='pic acea-row row-column row-center'>
+                    <view class='name line1'>{{item.title}}</view>
+                    <view>{{item.start_time ? item.start_time+'-' : ''}}{{item.end_time}}</view>
+                </view>
+                <view class="type" wx:if="{{item.type===0}}">通用劵</view>
+                <view class="type" wx:elif="{{item.type===1}}">品类券</view>
+                <view class="type" wx:else>商品券</view>
+            </view>
+        </view>
+    </view>
+    <view class='lid'>
+        <navigator hover-class='none' url='/pages/user_get_coupon/index' class='bnt font-color'>立即领取</navigator>
+        <view class='iconfont icon-guanbi3' bindtap='close'></view>
+    </view>
 </view>
-<view class='mask' catchtouchmove="true" hidden='{{window==false}}'></view>
+<view class='mask' catchtouchmove="true" hidden='{{window==false}}'></view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
view/xcx/components/coupon-window/index.wxss


+ 17 - 14
view/xcx/components/general-window/index.js

@@ -1,19 +1,22 @@
 var app = getApp();
+
 Component({
-  properties: {
-    generalActive: {
-      type: Boolean
+    properties: {
+        generalActive: {
+            type: Boolean
+        },
+        generalContent: {
+            type: Object
+        }
     },
-    generalContent: {
-      type:Object
+
+    data: {},
+
+    attached: function () {},
+    
+    methods: {
+        close: function () {
+            this.triggerEvent('generalWindow');
+        }
     }
-  },
-  data: {},
-  attached: function () {
-  },
-  methods: {
-    close: function (){
-      this.triggerEvent('generalWindow');
-    }
-  }
 })

+ 1 - 1
view/xcx/components/general-window/index.json

@@ -1,3 +1,3 @@
 {
-  "usingComponents": {}
+    "usingComponents": {}
 }

+ 7 - 6
view/xcx/components/general-window/index.wxml

@@ -1,10 +1,11 @@
 <view class='generalWindow'>
     <view class='generalTip {{generalActive==true?"on":""}}'>
-          <view class='pictrue'><image src='./../../images/promoter.png'></image></view>
-          <view class='name'>{{generalContent.title}}</view>
-          <view class='info'>{{generalContent.promoterNum}}</view>
-          <view class='tipBnt' bindtap='close'>我知道了</view>
+        <view class='pictrue'>
+            <image src='./../../images/promoter.png'></image>
+        </view>
+        <view class='name'>{{generalContent.title}}</view>
+        <view class='info'>{{generalContent.promoterNum}}</view>
+        <view class='tipBnt' bindtap='close'>我知道了</view>
     </view>
     <view class='mask' catchtouchmove="true" hidden='{{generalActive==false}}' bindtap='close'></view>
-</view>
-
+</view>

+ 83 - 10
view/xcx/components/general-window/index.wxss

@@ -1,12 +1,85 @@
 @import '/font/iconfont.wxss';
 @import '/css/style.wxss';
-.generalWindow .generalTip{position:fixed;top:50%;left:50%;width:560rpx;margin-left:-280rpx;z-index:99;border-radius:20rpx;background-color:#fff;transition:all 0.3s ease-in-out 0s;opacity:0;transform: scale(0);padding-bottom:60rpx;margin-top:-330rpx;}
-.generalWindow .generalTip.on{opacity:1;transform: scale(1);}
-.generalWindow .generalTip .pictrue{width:100%;height:270rpx;} 
-.generalWindow .generalTip .pictrue image{width:100%;height:100%;border-radius:20rpx 20rpx 0 0;}
-.generalWindow .generalTip .name{font-size:36rpx;font-weight:bold;color:#282828;text-align:center;padding:0 29rpx;margin-top:37rpx;}
-.generalWindow .generalTip .info{font-size:30rpx;color:#666;padding:0 29rpx;text-align:center;margin-top:21rpx;}
-.generalWindow .generalTip .info .money{font-weight:bold;margin:0 10rpx;}
-.generalWindow .generalTip .help{font-size:32rpx;font-weight:bold;text-align:center;margin-top:40rpx;}
-.generalWindow .generalTip .tipBnt{font-size:32rpx;color:#fff;width:360rpx;height:82rpx;border-radius:41rpx;background-image:linear-gradient(to right,#f67a38 0%,#f11b09 100%);text-align:center;line-height:82rpx;margin:50rpx auto 0 auto;}
-.generalWindow .mask{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(0, 0, 0, 0.7);z-index:55;}
+
+.generalWindow .generalTip {
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    width: 560rpx;
+    margin-left: -280rpx;
+    z-index: 99;
+    border-radius: 20rpx;
+    background-color: #fff;
+    transition: all 0.3s ease-in-out 0s;
+    opacity: 0;
+    transform: scale(0);
+    padding-bottom: 60rpx;
+    margin-top: -330rpx;
+}
+
+.generalWindow .generalTip.on {
+    opacity: 1;
+    transform: scale(1);
+}
+
+.generalWindow .generalTip .pictrue {
+    width: 100%;
+    height: 270rpx;
+}
+
+.generalWindow .generalTip .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 20rpx 20rpx 0 0;
+}
+
+.generalWindow .generalTip .name {
+    font-size: 36rpx;
+    font-weight: bold;
+    color: #282828;
+    text-align: center;
+    padding: 0 29rpx;
+    margin-top: 37rpx;
+}
+
+.generalWindow .generalTip .info {
+    font-size: 30rpx;
+    color: #666;
+    padding: 0 29rpx;
+    text-align: center;
+    margin-top: 21rpx;
+}
+
+.generalWindow .generalTip .info .money {
+    font-weight: bold;
+    margin: 0 10rpx;
+}
+
+.generalWindow .generalTip .help {
+    font-size: 32rpx;
+    font-weight: bold;
+    text-align: center;
+    margin-top: 40rpx;
+}
+
+.generalWindow .generalTip .tipBnt {
+    font-size: 32rpx;
+    color: #fff;
+    width: 360rpx;
+    height: 82rpx;
+    border-radius: 41rpx;
+    background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
+    text-align: center;
+    line-height: 82rpx;
+    margin: 50rpx auto 0 auto;
+}
+
+.generalWindow .mask {
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: rgba(0, 0, 0, 0.7);
+    z-index: 55;
+}

+ 36 - 31
view/xcx/components/goodList/index.js

@@ -1,36 +1,41 @@
 // components/goodList/index.js
 Component({
-  properties: {
-    status: {
-      type: String,
-      value: 0,
+    properties: {
+        status: {
+            type: String,
+            value: 0,
+        },
+        bastList: {
+            type: Object,
+            value: [],
+        }
     },
-    bastList: {
-      type: Object,
-      value: [],
+
+    data: {},
+    
+    methods: {
+        /**
+         * 商品详情跳转
+         */
+        goDetail: function (e) {
+            let item = e.currentTarget.dataset.items
+            if (item.activity && item.activity.type === "1") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
+                });
+            } else if (item.activity && item.activity.type === "2") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`
+                });
+            } else if (item.activity && item.activity.type === "3") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
+                });
+            } else {
+                wx.navigateTo({
+                    url: `/pages/goods_details/index?id=${item.id}`
+                });
+            }
+        },
     }
-  },
-  data: {
-  },
-  methods: {
-   /**
-   * 商品详情跳转
-   */
-   goDetail: function (e) {
-    let item = e.currentTarget.dataset.items
-   if (item.activity && item.activity.type === "1") {
-     wx.navigateTo({
-       url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
-     });
-   } else if (item.activity && item.activity.type === "2") {
-    wx.navigateTo({ url:  `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`});
-   } else if (item.activity && item.activity.type === "3") {
-     wx.navigateTo({
-       url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
-     });
-   } else {
-     wx.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
-   }
-   },
-  }
 })

+ 2 - 2
view/xcx/components/goodList/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 32 - 29
view/xcx/components/goodList/index.wxml

@@ -1,36 +1,39 @@
 <view class='goodList'>
-  <block wx:for="{{bastList}}" wx:key='index'>
-    <view bindtap="goDetail" data-items='{{item}}' class='item acea-row row-between-wrapper'>
+    <block wx:for="{{bastList}}" wx:key='index'>
+        <view bindtap="goDetail" data-items='{{item}}' class='item acea-row row-between-wrapper'>
 
-      <!-- 首发新品 商品图片 -->
-      <view class='pictrue'>
-        <image src='{{item.image}}'></image>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
-      </view>
+            <!-- 首发新品 商品图片 -->
+            <view class='pictrue'>
+                <image src='{{item.image}}'></image>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
+            </view>
 
-      <view class='underline'>
-        <view class='text'>
-          <view class='line1'>{{item.store_name}}</view>
-          <view class='money font-color'>
-            ¥<text class='num'>{{item.price}}</text>
-          </view>
-          <view class='vip-money acea-row row-middle' wx:if='{{item.vip_price && item.vip_price > 0}}'>
-            <!-- 暂时不再显示会员价
+            <view class='underline'>
+                <view class='text'>
+                    <view class='line1'>{{item.store_name}}</view>
+                    <view class='money font-color'>
+                        ¥<text class='num'>{{item.price}}</text>
+                    </view>
+                    <view class='vip-money acea-row row-middle' wx:if='{{item.vip_price && item.vip_price > 0}}'>
+                        <!-- 暂时不再显示会员价
             ¥{{item.vip_price || 0}}
             <image  src='/images/vip.png'></image>
             -->
-            <text class='num'>已售{{item.sales}}{{item.unit_name}}</text>
-          </view>
-          <view class='vip-money acea-row row-middle' wx:else>
-            <text class='num'>已售{{item.sales}}{{item.unit_name}}</text>
-          </view>
-        </view>
-      </view>
+                        <text class='num'>已售{{item.sales}}{{item.unit_name}}</text>
+                    </view>
+                    <view class='vip-money acea-row row-middle' wx:else>
+                        <text class='num'>已售{{item.sales}}{{item.unit_name}}</text>
+                    </view>
+                </view>
+            </view>
 
-      <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'>
-      </view>
-    </view>
-  </block>   
-</view>
+            <view class='iconfont icon-gouwuche cart-color acea-row row-center-wrapper'>
+            </view>
+        </view>
+    </block>
+</view>

+ 81 - 13
view/xcx/components/goodList/index.wxss

@@ -1,14 +1,82 @@
 @import '/app.wxss';
-.goodList .item{position:relative;padding-left:30rpx;}
-.goodList .item .pictrue{width:180rpx;height:180rpx;position:relative;}
-.goodList .item .pictrue image{width:100%;height:100%;border-radius:6rpx;}
-.goodList .item .pictrue .numPic{position:absolute;left:7rpx;top:7rpx;width:50rpx;height:50rpx;border-radius:50%;}
-.goodList .item .underline{padding:30rpx 30rpx 30rpx 0;border-bottom:1px solid #f5f5f5;}
-.goodList .item:nth-last-child(1) .underline{border-bottom:0; }
-.goodList .item .text{font-size:30rpx;color:#222;width:489rpx;}
-.goodList .item .text .money{font-size:26rpx;font-weight:bold;margin-top:50rpx;}
-.goodList .item .text .money .num{font-size:34rpx;}
-.goodList .item .text .vip-money{font-size:24rpx;color:#282828;font-weight:bold;margin-top:15rpx;}
-.goodList .item .text .vip-money image{width:46rpx;height:21rpx;margin-left:5rpx;}
-.goodList .item .text .vip-money .num{font-size:22rpx;color:#aaa;font-weight:normal;margin:-2rpx 0 0 22rpx;}
-.goodList .item .iconfont{position:absolute;right:30rpx;width:50rpx;height:50rpx;border-radius:50%;font-size:30rpx;bottom:38rpx;}
+
+.goodList .item {
+    position: relative;
+    padding-left: 30rpx;
+}
+
+.goodList .item .pictrue {
+    width: 180rpx;
+    height: 180rpx;
+    position: relative;
+}
+
+.goodList .item .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 6rpx;
+}
+
+.goodList .item .pictrue .numPic {
+    position: absolute;
+    left: 7rpx;
+    top: 7rpx;
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 50%;
+}
+
+.goodList .item .underline {
+    padding: 30rpx 30rpx 30rpx 0;
+    border-bottom: 1px solid #f5f5f5;
+}
+
+.goodList .item:nth-last-child(1) .underline {
+    border-bottom: 0;
+}
+
+.goodList .item .text {
+    font-size: 30rpx;
+    color: #222;
+    width: 489rpx;
+}
+
+.goodList .item .text .money {
+    font-size: 26rpx;
+    font-weight: bold;
+    margin-top: 50rpx;
+}
+
+.goodList .item .text .money .num {
+    font-size: 34rpx;
+}
+
+.goodList .item .text .vip-money {
+    font-size: 24rpx;
+    color: #282828;
+    font-weight: bold;
+    margin-top: 15rpx;
+}
+
+.goodList .item .text .vip-money image {
+    width: 46rpx;
+    height: 21rpx;
+    margin-left: 5rpx;
+}
+
+.goodList .item .text .vip-money .num {
+    font-size: 22rpx;
+    color: #aaa;
+    font-weight: normal;
+    margin: -2rpx 0 0 22rpx;
+}
+
+.goodList .item .iconfont {
+    position: absolute;
+    right: 30rpx;
+    width: 50rpx;
+    height: 50rpx;
+    border-radius: 50%;
+    font-size: 30rpx;
+    bottom: 38rpx;
+}

+ 62 - 59
view/xcx/components/home/index.js

@@ -1,77 +1,80 @@
 // components/home/index.js
 Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        homeActive: false
+    },
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    homeActive:false
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+
+    },
+
+    setTouchMove: function (e) {
+        var that = this;
+        if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
+            that.setData({
+                top: e.touches[0].clientY
+            })
+        }
+    },
+
+    open: function () {
+        this.setData({
+            homeActive: !this.data.homeActive
+        })
+    },
     
-  },
-  setTouchMove: function (e) {
-    var that = this;
-    if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
-      that.setData({
-        top: e.touches[0].clientY
-      })
-    }
-  },
-  open:function(){
-     this.setData({
-       homeActive: !this.data.homeActive
-     })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
 
-  },
+    },
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
 
-  },
+    },
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
 
-  },
+    },
 
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
 
-  },
+    },
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
 
-  }
+    }
 })

+ 2 - 2
view/xcx/components/home/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 14 - 18
view/xcx/components/home/index.wxml

@@ -1,19 +1,15 @@
-<!-- <view class='home' style=" top:{{top*2}}rpx;" catchtouchmove="setTouchMove">
-   
-        <view class='homeCon bg-color acea-row row-column-between {{homeActive==true?"on":""}}'>
-          <navigator hover-class='none' url='/pages/index/index'  open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
-          <navigator hover-class='none' url='/pages/order_addcart/order_addcart'  open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
-          <navigator hover-class='none' url='/pages/user/user'  open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
-      </view>
-   <view class='pictrue' bindtap='open'><image src='{{homeActive==false?"/images/close.gif":"/images/open.gif"}}'></image></view>
-</view> -->
+<view class='home acea-row row-middle {{homeActive==true?"on":""}}' style=" top:{{top*2}}rpx;"
+    catchtouchmove="setTouchMove">
 
-<view class='home acea-row row-middle {{homeActive==true?"on":""}}' style=" top:{{top*2}}rpx;" catchtouchmove="setTouchMove">
-   
-        <view class='homeCon acea-row row-between-wrapper {{homeActive==true?"on":""}}'>
-          <navigator hover-class='none' url='/pages/index/index'  open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
-          <navigator hover-class='none' url='/pages/order_addcart/order_addcart'  open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
-          <navigator hover-class='none' url='/pages/user/user'  open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
-      </view>
-   <view class='pictrue {{homeActive==true?"on":""}}' bindtap='open'><image src='{{homeActive==false?"/images/close.gif":"/images/open.gif"}}'></image></view>
-</view>
+    <view class='homeCon acea-row row-between-wrapper {{homeActive==true?"on":""}}'>
+        <navigator hover-class='none' url='/pages/index/index' open-type='switchTab'
+            class='iconfont icon-shouye-xianxing'></navigator>
+        <navigator hover-class='none' url='/pages/order_addcart/order_addcart' open-type='switchTab'
+            class='iconfont icon-caigou-xianxing'></navigator>
+        <navigator hover-class='none' url='/pages/user/user' open-type='switchTab' class='iconfont icon-yonghu1'>
+        </navigator>
+    </view>
+    <view class='pictrue {{homeActive==true?"on":""}}' bindtap='open'>
+        <image src='{{homeActive==false?"/images/close.gif":"/images/open.gif"}}'></image>
+    </view>
+</view>

+ 54 - 8
view/xcx/components/home/index.wxss

@@ -6,11 +6,57 @@
 .home .pictrue{width:86rpx;height:86rpx;border-radius:50%;margin-top:20rpx;}
 .home .pictrue image{width:100%;height:100%;border-radius:50%;} */
 
-.home{position: fixed ;bottom:100rpx;color: white;text-align: center;z-index:99;right:10rpx;height: 86rpx;width:96rpx;overflow:hidden;}
-.home.on{width:396rpx;}
-.home .homeCon{border-radius:50rpx;box-sizing:border-box;transform:translate3d(500rpx,0,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);height:86rpx;background-color:#f44939;color:#f44939;}
-.home .homeCon.on{transform:translate3d(0,0,0);color:#fff;}
-.home .homeCon .iconfont{font-size:48rpx;width:100rpx;}
-.home .pictrue{width:86rpx;height:86rpx;border-radius:50%;margin-left: 10rpx;margin-top:-86rpx;}
-.home .pictrue image{width:100%;height:100%;border-radius:50%;transform: rotate(90deg);}
-.home .pictrue.on{margin-top:0;}
+.home {
+    position: fixed;
+    bottom: 100rpx;
+    color: white;
+    text-align: center;
+    z-index: 99;
+    right: 10rpx;
+    height: 86rpx;
+    width: 96rpx;
+    overflow: hidden;
+}
+
+.home.on {
+    width: 396rpx;
+}
+
+.home .homeCon {
+    border-radius: 50rpx;
+    box-sizing: border-box;
+    transform: translate3d(500rpx, 0, 0);
+    transition: all .3s cubic-bezier(.25, .5, .5, .9);
+    height: 86rpx;
+    background-color: #f44939;
+    color: #f44939;
+}
+
+.home .homeCon.on {
+    transform: translate3d(0, 0, 0);
+    color: #fff;
+}
+
+.home .homeCon .iconfont {
+    font-size: 48rpx;
+    width: 100rpx;
+}
+
+.home .pictrue {
+    width: 86rpx;
+    height: 86rpx;
+    border-radius: 50%;
+    margin-left: 10rpx;
+    margin-top: -86rpx;
+}
+
+.home .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 50%;
+    transform: rotate(90deg);
+}
+
+.home .pictrue.on {
+    margin-top: 0;
+}

+ 163 - 161
view/xcx/components/mine/index.js

@@ -1,179 +1,181 @@
 // components/mine/index.js
-import { getMineStatus, bootCoin, coinHistory } from "../../api/mine"
-import { strip, tsToStringDate } from "../../utils/util"
+import {
+    getMineStatus,
+    bootCoin,
+    coinHistory
+} from "../../api/mine"
+import {
+    strip,
+    tsToStringDate
+} from "../../utils/util"
 
 var app = getApp()
 
 Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-  },
+    /**
+     * 组件的属性列表
+     */
+    properties: {},
 
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    history: [],
-    symbol: "DOGE",
-    icon: "/images/one.png",
-    total: 0.00,
-    progress: 0.00, // 0 表示已停止
-    step: 0.00001,  // 步长
-    price: 0.0,
+    /**
+     * 组件的初始数据
+     */
+    data: {
+        history: [],
+        symbol: "DOGE",
+        icon: "/images/one.png",
+        total: 0.00,
+        progress: 0.00, // 0 表示已停止
+        step: 0.00001, // 步长
+        price: 0.0,
 
-    displaying: false,  // 当前是否在这个界面
-    iShidden: false,
-    stepTimer: null,
-    syncTimer: null
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    show: function() {
-      // console.log('show:', app.globalData.token)
-      if (app.globalData.isLog) {
-        this.setData({ iShidden:true})
-        this.getStatus()
-        this.getHistory()
-      }
-
-      this.setData({
-        displaying: true,
-      })
-    },
-  
-    hide: function() {
-      if (this.data.stepTimer) {
-        clearInterval(this.data.stepTimer);
-      }
-      if (this.data.syncTimer) {
-        clearInterval(this.data.syncTimer);
-      }
-      this.setData({
+        displaying: false, // 当前是否在这个界面
+        iShidden: false,
         stepTimer: null,
-        syncTimer: null,
-        displaying: false,
-      })
+        syncTimer: null
     },
 
-    getStatus: function() {
-      // console.log('isLog:', app.globalData.isLog)
-      if (app.globalData.isLog) {
-        var that = this;
-        getMineStatus().then(res=>{
-          that.setData({
-            symbol: res.data.symbol,
-            icon: res.data.icon,
-            total: res.data.total,
-            progress: res.data.progress,
-            step: res.data.step,
-            price: res.data.price,
-          });
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+        show: function () {
+            // console.log('show:', app.globalData.token)
+            if (app.globalData.isLog) {
+                this.setData({
+                    iShidden: true
+                })
+                this.getStatus()
+                this.getHistory()
+            }
 
-          if (that.data.progress > 0.0) {
-            that.setupTimers();
-          }
-        }, err=>{
-          console.log(err);
-          that.setData({
-            total: 0,
-            progress: 0
-          });
-        });
-      }
-    },
+            this.setData({
+                displaying: true,
+            })
+        },
 
-    getHistory: function() {
-      if (app.globalData.isLog) {
-        var that = this
-        coinHistory().then(res=>{
-          if (res.data.length > 0) {
-            res.data.forEach(function(e){
-              e.ts = tsToStringDate(e.ts)
+        hide: function () {
+            if (this.data.stepTimer) {
+                clearInterval(this.data.stepTimer);
+            }
+            if (this.data.syncTimer) {
+                clearInterval(this.data.syncTimer);
+            }
+            this.setData({
+                stepTimer: null,
+                syncTimer: null,
+                displaying: false,
             })
-          }
-          that.setData({
-            history: res.data,
-          })
-        })
-      }
-    },
+        },
 
-    onLoadFun:function() {
-      if (this.data.displaying && app.globalData.isLog){
-        // console.log("onLoadFun")
-        this.getStatus()
-        this.getHistory()
-      }
-    },
+        getStatus: function () {
+            // console.log('isLog:', app.globalData.isLog)
+            if (app.globalData.isLog) {
+                var that = this;
+                getMineStatus().then(res => {
+                    that.setData({
+                        symbol: res.data.symbol,
+                        icon: res.data.icon,
+                        total: res.data.total,
+                        progress: res.data.progress,
+                        step: res.data.step,
+                        price: res.data.price,
+                    });
 
-    // 客户端走进度,定时同步
-    clientStep: function() {
-      if (this.data.progress > 0 && this.data.step > 0) {
-        var harfStep = this.data.step / 2
-        var curStep = Math.floor(Math.random() * 10) * harfStep / 10 + harfStep
-        var curProgress = strip(this.data.progress + curStep)
-        this.setData({
-          progress: curProgress,
-        })
-      }
-    },
-    
-    setupTimers: function() {
-      var that = this
-      if (that.data.syncTimer == null) {
-        that.setData({
-          syncTimer: setInterval(() => {
-            that.getStatus()
-          }, 1000 * 60 * 2),
-        })
-      }
+                    if (that.data.progress > 0.0) {
+                        that.setupTimers();
+                    }
+                }, err => {
+                    console.log(err);
+                    that.setData({
+                        total: 0,
+                        progress: 0
+                    });
+                });
+            }
+        },
 
-      if (that.data.stepTimer == null && that.data.step > 0.0) {
-        that.setData({
-          stepTimer: setInterval(() => {
-            that.clientStep();
-          }, 1000),
-        })
-      }
-    },
+        getHistory: function () {
+            if (app.globalData.isLog) {
+                var that = this
+                coinHistory().then(res => {
+                    if (res.data.length > 0) {
+                        res.data.forEach(function (e) {
+                            e.ts = tsToStringDate(e.ts)
+                        })
+                    }
+                    that.setData({
+                        history: res.data,
+                    })
+                })
+            }
+        },
 
-    onClickStart: function() {
-      if (this.data.progress > 0.0) {
-        return
-      }
-      var that = this
-      bootCoin().then(res=>{
-        if (res.status === 200) {
-          that.setData({
-            symbol: res.data.symbol,
-            coin: res.data.coin,
-            price: res.data.price,
-            step: res.data.step,
-            progress: res.data.progress,
-            total: res.data.total,
-          })
-          if (that.data.progress > 0.0) {
-            that.setupTimers();
-          }
-        }
-      }).catch(err=>{
-        wx.showToast({
-          title: err,
-          icon: 'none',
-          duration: 2000,
-        })
-      })
-    },
+        onLoadFun: function () {
+            if (this.data.displaying && app.globalData.isLog) {
+                // console.log("onLoadFun")
+                this.getStatus()
+                this.getHistory()
+            }
+        },
+
+        // 客户端走进度,定时同步
+        clientStep: function () {
+            if (this.data.progress > 0 && this.data.step > 0) {
+                var harfStep = this.data.step / 2
+                var curStep = Math.floor(Math.random() * 10) * harfStep / 10 + harfStep
+                var curProgress = strip(this.data.progress + curStep)
+                this.setData({
+                    progress: curProgress,
+                })
+            }
+        },
 
-    // goRule: function() {
-    //   wx.navigateTo({
-    //     url: '/pages/mine_rule/index',
-    //   })
-    // },
-  }
-})
+        setupTimers: function () {
+            var that = this
+            if (that.data.syncTimer == null) {
+                that.setData({
+                    syncTimer: setInterval(() => {
+                        that.getStatus()
+                    }, 1000 * 60 * 2),
+                })
+            }
+
+            if (that.data.stepTimer == null && that.data.step > 0.0) {
+                that.setData({
+                    stepTimer: setInterval(() => {
+                        that.clientStep();
+                    }, 1000),
+                })
+            }
+        },
+
+        onClickStart: function () {
+            if (this.data.progress > 0.0) {
+                return
+            }
+            var that = this
+            bootCoin().then(res => {
+                if (res.status === 200) {
+                    that.setData({
+                        symbol: res.data.symbol,
+                        coin: res.data.coin,
+                        price: res.data.price,
+                        step: res.data.step,
+                        progress: res.data.progress,
+                        total: res.data.total,
+                    })
+                    if (that.data.progress > 0.0) {
+                        that.setupTimers();
+                    }
+                }
+            }).catch(err => {
+                wx.showToast({
+                    title: err,
+                    icon: 'none',
+                    duration: 2000,
+                })
+            })
+        },
+    }
+})

+ 4 - 4
view/xcx/components/mine/index.json

@@ -1,6 +1,6 @@
 {
-  "component": true,
-  "usingComponents": {
-    "authorize": "/components/authorize/authorize"
-  }
+    "component": true,
+    "usingComponents": {
+        "authorize": "/components/authorize/authorize"
+    }
 }

+ 32 - 32
view/xcx/components/mine/index.wxml

@@ -1,44 +1,44 @@
 <view class="mine">
     <!-- total -->
     <view class="head">
-      <image src="{{icon}}"></image>
-      <text class="balance">{{ symbol }}:</text>
-      <text class="balance">{{total}}</text> 
+        <image src="{{icon}}"></image>
+        <text class="balance">{{ symbol }}:</text>
+        <text class="balance">{{total}}</text>
     </view>
     <!-- digging -->
     <view class="main">
-      <view class="left">
-        <button class="{{ progress > 0 ? 'started': 'stopped'}}" bindtap="onClickStart">
-        {{ progress > 0 ? '运行中': '启动'}}
-        </button>
-      </view>
-      <view class="right">
-        <view class="current">
-          <text class="progress">{{progress}}</text>
+        <view class="left">
+            <button class="{{ progress > 0 ? 'started': 'stopped'}}" bindtap="onClickStart">
+                {{ progress > 0 ? '运行中': '启动'}}
+            </button>
+        </view>
+        <view class="right">
+            <view class="current">
+                <text class="progress">{{progress}}</text>
+            </view>
         </view>
-      </view>
     </view>
     <!-- history -->
     <view class="his">
-      <view class="his-img">
-        <image src="/images/historyTitle.png"></image>
-      </view>
-      <view class="no-record" wx:if="{{history.length <= 0}}">
-        <text>没有记录</text>
-      </view>
-      <view wx:else>
-        <scroll-view class="records" scroll-y="true" scroll-with-animation="true">
-          <view wx:for="{{history}}" wx:key="index" class="item {{ item.out != 0 ? 'color' : '' }}">
-            <view class="icon">
-              <image src="{{item.icon}}"></image>
-            </view>
-            <text class="symbol">{{item.symbol}}</text>
-            <text class="direction">{{ item.out == 0 ? "获取" : "导出" }}</text>
-            <text class="amount">{{item.out == 0 ? item.amount : -item.amount}}</text>
-            <text class="time">{{ item.ts }}</text>
-          </view>
-        </scroll-view>
-      </view>
+        <view class="his-img">
+            <image src="/images/historyTitle.png"></image>
+        </view>
+        <view class="no-record" wx:if="{{history.length <= 0}}">
+            <text>没有记录</text>
+        </view>
+        <view wx:else>
+            <scroll-view class="records" scroll-y="true" scroll-with-animation="true">
+                <view wx:for="{{history}}" wx:key="index" class="item {{ item.out != 0 ? 'color' : '' }}">
+                    <view class="icon">
+                        <image src="{{item.icon}}"></image>
+                    </view>
+                    <text class="symbol">{{item.symbol}}</text>
+                    <text class="direction">{{ item.out == 0 ? "获取" : "导出" }}</text>
+                    <text class="amount">{{item.out == 0 ? item.amount : -item.amount}}</text>
+                    <text class="time">{{ item.ts }}</text>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </view>
-<authorize bind:onLoadFun='onLoadFun' iShidden="{{iShidden}}"></authorize>
+<authorize bind:onLoadFun='onLoadFun' iShidden="{{iShidden}}"></authorize>

+ 114 - 102
view/xcx/components/mine/index.wxss

@@ -1,162 +1,174 @@
 .mine {
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  background-color: #fff;
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    background-color: #fff;
 }
 
 .mine .head {
-  display: flex;
-  flex-direction: row;
-  justify-content: center; 
-  align-items: center; 
-  margin-top:20rpx;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    margin-top: 20rpx;
 }
+
 .mine .head image {
-  height: 64rpx; 
-  width: 64rpx;
-  margin: 0 10rpx;
+    height: 64rpx;
+    width: 64rpx;
+    margin: 0 10rpx;
+}
+
+.mine .head .balance {
+    color: #301310;
+    font-size: 36rpx;
 }
-.mine .head .balance {color: #301310; font-size: 36rpx;}
 
 .mine .main {
-  display: flex;
-  flex-direction: row;
-  margin-top: 36rpx;
-  height: 240rpx;
+    display: flex;
+    flex-direction: row;
+    margin-top: 36rpx;
+    height: 240rpx;
 }
 
 .mine .main .left {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  width: 40%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    width: 40%;
 }
 
 .main .left .stopped {
-  width: 200rpx; 
-  height: 200rpx;
-  background: #838383!important; 
-  color: #fff; 
-  border-radius: 50%;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
+    width: 200rpx;
+    height: 200rpx;
+    background: #838383 !important;
+    color: #fff;
+    border-radius: 50%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
 }
 
 .main .left .started {
-  width: 200rpx; 
-  height: 200rpx;
-  background-color: rgba(214, 31, 31, 0.9)!important; 
-  color: #fff; 
-  border-radius: 50%;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-
-  transform: scale(1);
-  animation: heartbeat 3s;
-  animation-iteration-count: infinite;
-}
-
-@keyframes heartbeat{
-  60%{
-    transform: scale(1.1);
-  }
-  100%{
+    width: 200rpx;
+    height: 200rpx;
+    background-color: rgba(214, 31, 31, 0.9) !important;
+    color: #fff;
+    border-radius: 50%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+
     transform: scale(1);
-  }
+    animation: heartbeat 3s;
+    animation-iteration-count: infinite;
+}
+
+@keyframes heartbeat {
+    60% {
+        transform: scale(1.1);
+    }
+
+    100% {
+        transform: scale(1);
+    }
 }
 
-.mine .main .right { 
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
+.mine .main .right {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
 }
 
 .mine .main .right .current {
-  display: flex;
-  flex-direction: row;
-  justify-content: flex-start;
-  align-items: flex-start;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: flex-start;
 }
 
 .mine .main .right .current .progress {
-  font-size: 48rpx;
-  color: #e93323;
+    font-size: 48rpx;
+    color: #e93323;
 }
 
 .mine .his {
-  display: flex;
-  flex-direction: column;
-  justify-content: flex-start;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
 }
 
 .mine .his .his-img {
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
 }
+
 .mine .his .his-img image {
-  width: 431rpx;
-  height: 88rpx;
+    width: 431rpx;
+    height: 88rpx;
 }
 
 .mine .his .no-record {
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  margin-top: 32rpx;
-  color: gray;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    margin-top: 32rpx;
+    color: gray;
 }
 
 .mine .his .records {
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  margin: 32rpx 20rpx;
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    margin: 32rpx 20rpx;
 }
+
 .mine .his .records .item {
-  display: flex;
-  flex-direction: row;
-  justify-content: flex-start;
-  align-items: center;
-  height: 54rpx;
-  margin: 10rpx;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+    height: 54rpx;
+    margin: 10rpx;
 }
+
 .mine .his .records .color {
-  color: #e93323;
+    color: #e93323;
 }
+
 .mine .his .records .item .icon {
-  display: flex;
-  flex-direction: row;
-  justify-content: flex-start;
-  align-items: center;
-  width: 10%;
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    align-items: center;
+    width: 10%;
 }
 
 .mine .his .records .item .icon image {
-  width: 48rpx;
-  height: 48rpx;
+    width: 48rpx;
+    height: 48rpx;
 }
 
 .mine .his .records .item .symbol {
-  display: flex;
-  width: 15%;
+    display: flex;
+    width: 15%;
 }
+
 .mine .his .records .item .direction {
-  display: flex;
-  width: 15%;
+    display: flex;
+    width: 15%;
 }
 
 .mine .his .records .item .amount {
-  display: flex;
-  width: 30%;
+    display: flex;
+    width: 30%;
 }
+
 .mine .his .records .item .time {
-  display: flex;
-  width: 30%;
-}
+    display: flex;
+    width: 30%;
+}

+ 80 - 65
view/xcx/components/navbar/index.js

@@ -1,72 +1,87 @@
 var app = getApp();
+
 Component({
-  properties: {
-    parameter:{
-      type: Object,
-      value:{
-        class:'0'
-      },
+    properties: {
+        parameter: {
+            type: Object,
+            value: {
+                class: '0'
+            },
+        },
+        logoUrl: {
+            type: String,
+            value: '',
+        }
     },
-    logoUrl:{
-      type:String,
-      value:'',
-    }
-  },
-  data: {
-    navH: ""
-  },
-  ready: function(){
-    this.setClass();
-    var pages = getCurrentPages();
-    if (pages.length <= 1) this.setData({'parameter.return':0});
-  },
-  attached: function () {
-    this.setData({
-      navH: app.globalData.navHeight
-    });
-  },
-  methods: {
-    return:function(){
-      wx.navigateBack({
-        delta: 1
-      });
-      // var pages = getCurrentPages();
-      // wx.navigateBack({
-      //   delta: pages.length-2
-      // });
+
+    data: {
+        navH: ""
+    },
+
+    ready: function () {
+        this.setClass();
+        var pages = getCurrentPages();
+        if (pages.length <= 1) this.setData({
+            'parameter.return': 0
+        });
     },
-    setGoodsSearch:function(){
-       wx.navigateTo({
-         url: '/pages/goods_search/index',
-       })
+
+    attached: function () {
+        this.setData({
+            navH: app.globalData.navHeight
+        });
     },
-    setClass:function(){
-      var color = '';
-      switch (this.data.parameter.class) {
-        case "0": case 'on':
-          color = 'on'
-          break;
-        case '1': case 'black':
-          color = 'black'
-          break;
-        case '2': case 'gray':
-          color = 'gray'
-          break;
-        case '3': case "red":
-          color = 'red'
-          break;
-        case '4': case "gradual01":
-          color = 'gradual01'
-          break;
-        case '5': case "gradual02":
-          color = 'gradual02'
-          break;
-        default:
-          break;
-      }
-      this.setData({
-        'parameter.class': color
-      })
+
+    methods: {
+        return: function () {
+            wx.navigateBack({
+                delta: 1
+            });
+            // var pages = getCurrentPages();
+            // wx.navigateBack({
+            //   delta: pages.length-2
+            // });
+        },
+        
+        setGoodsSearch: function () {
+            wx.navigateTo({
+                url: '/pages/goods_search/index',
+            })
+        },
+        
+        setClass: function () {
+            var color = '';
+            switch (this.data.parameter.class) {
+                case "0":
+                case 'on':
+                    color = 'on'
+                    break;
+                case '1':
+                case 'black':
+                    color = 'black'
+                    break;
+                case '2':
+                case 'gray':
+                    color = 'gray'
+                    break;
+                case '3':
+                case "red":
+                    color = 'red'
+                    break;
+                case '4':
+                case "gradual01":
+                    color = 'gradual01'
+                    break;
+                case '5':
+                case "gradual02":
+                    color = 'gradual02'
+                    break;
+                default:
+                    break;
+            }
+            this.setData({
+                'parameter.class': color
+            })
+        }
     }
-  }
 })

+ 2 - 2
view/xcx/components/navbar/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 15 - 11
view/xcx/components/navbar/index.wxml

@@ -1,13 +1,17 @@
 <view class='navbar {{parameter.class}}' style='height:{{navH}}rpx'>
-   <view class='navbarH' style='height:{{navH}}rpx;'>
-      <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==0}}'>
-         <view class='search acea-row row-middle' bindtap='setGoodsSearch'><text class='iconfont icon-xiazai5'></text>搜索商品</view>
-         <view class='logo'><image src='{{logoUrl}}'></image></view>
-      </view>
-      <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==1}}'>
-         <view class='name {{parameter.color==true?"on":""}} line1'>{{parameter.title}}</view>
-         <view class='iconfont icon-xiangzuo {{parameter.color==true?"on":""}}' wx:if='{{parameter.return==1}}' bindtap='return'></view>
-      </view>
-   </view>
+    <view class='navbarH' style='height:{{navH}}rpx;'>
+        <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==0}}'>
+            <view class='search acea-row row-middle' bindtap='setGoodsSearch'><text
+                    class='iconfont icon-xiazai5'></text>搜索商品</view>
+            <view class='logo'>
+                <image src='{{logoUrl}}'></image>
+            </view>
+        </view>
+        <view class='navbarCon acea-row row-center-wrapper' wx:if='{{parameter.navbar==1}}'>
+            <view class='name {{parameter.color==true?"on":""}} line1'>{{parameter.title}}</view>
+            <view class='iconfont icon-xiangzuo {{parameter.color==true?"on":""}}' wx:if='{{parameter.return==1}}'
+                bindtap='return'></view>
+        </view>
+    </view>
 </view>
-<view style='height:{{navH}}rpx'></view>
+<view style='height:{{navH}}rpx'></view>

+ 105 - 17
view/xcx/components/navbar/index.wxss

@@ -1,19 +1,107 @@
 @import '/app.wxss';
-.navbar{position:fixed;background-color:#fff;top:0;left:0;z-index:999;width:100%;}
-.navbar.on{background-color:#e93323;}
-.navbar.black{background-color:#232323;}
-.navbar.gray{background-color:#666;}
-.navbar.red{background-color:#eb5447;}
+
+.navbar {
+    position: fixed;
+    background-color: #fff;
+    top: 0;
+    left: 0;
+    z-index: 999;
+    width: 100%;
+}
+
+.navbar.on {
+    background-color: #e93323;
+}
+
+.navbar.black {
+    background-color: #232323;
+}
+
+.navbar.gray {
+    background-color: #666;
+}
+
+.navbar.red {
+    background-color: #eb5447;
+}
+
 /* .navbar.gradual01{background-image: linear-gradient(to right,#f67837 0%,#f11d09 100%);} */
-.navbar.gradual01{background-image: linear-gradient(to right,#f67837 0%,#f11d09 100%);}
-.navbar.gradual02{background-image: linear-gradient(to right,#ff3366 0%,#ff6533 100%);}
-.navbar .navbarH{position:relative;}
-.navbar .navbarH .navbarCon{position:absolute;bottom:0;height:100rpx;width:100%;}
-.navbar .navbarH .navbarCon .name{color:#000;font-size:36rpx;font-weight:bold;width: 300rpx;text-align: center;}
-.navbar .navbarH .navbarCon .name.on{color:#fff;}
-.navbar .navbarH .navbarCon .icon-xiangzuo{color:#000;font-weight:bold;position:absolute;font-size:40rpx;left:16rpx;width:100rpx;height:56rpx;line-height:54rpx;top:50%;transform:translateY(-50%);}
-.navbar .navbarH .navbarCon .icon-xiangzuo.on{color:#fff;}
-.navbar .navbarH .navbarCon .logo{width:116rpx;height:45rpx;position:absolute;left:30rpx;top:50%;transform:translateY(-50%);}
-.navbar .navbarH .navbarCon .logo image{width:100%;height:100%;display:block;}
-.navbar .navbarH .navbarCon .search{width:360rpx;height:64rpx;background-color:#f7f7f7;border-radius:50rpx;padding:0 28rpx;box-sizing:border-box;font-size:28rpx;color:#bbb;margin-right:26rpx;}
-.navbar .navbarH .navbarCon .search .icon-xiazai5{font-size:34rpx;margin-right:16rpx;}
+.navbar.gradual01 {
+    background-image: linear-gradient(to right, #f67837 0%, #f11d09 100%);
+}
+
+.navbar.gradual02 {
+    background-image: linear-gradient(to right, #ff3366 0%, #ff6533 100%);
+}
+
+.navbar .navbarH {
+    position: relative;
+}
+
+.navbar .navbarH .navbarCon {
+    position: absolute;
+    bottom: 0;
+    height: 100rpx;
+    width: 100%;
+}
+
+.navbar .navbarH .navbarCon .name {
+    color: #000;
+    font-size: 36rpx;
+    font-weight: bold;
+    width: 300rpx;
+    text-align: center;
+}
+
+.navbar .navbarH .navbarCon .name.on {
+    color: #fff;
+}
+
+.navbar .navbarH .navbarCon .icon-xiangzuo {
+    color: #000;
+    font-weight: bold;
+    position: absolute;
+    font-size: 40rpx;
+    left: 16rpx;
+    width: 100rpx;
+    height: 56rpx;
+    line-height: 54rpx;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+.navbar .navbarH .navbarCon .icon-xiangzuo.on {
+    color: #fff;
+}
+
+.navbar .navbarH .navbarCon .logo {
+    width: 116rpx;
+    height: 45rpx;
+    position: absolute;
+    left: 30rpx;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+.navbar .navbarH .navbarCon .logo image {
+    width: 100%;
+    height: 100%;
+    display: block;
+}
+
+.navbar .navbarH .navbarCon .search {
+    width: 360rpx;
+    height: 64rpx;
+    background-color: #f7f7f7;
+    border-radius: 50rpx;
+    padding: 0 28rpx;
+    box-sizing: border-box;
+    font-size: 28rpx;
+    color: #bbb;
+    margin-right: 26rpx;
+}
+
+.navbar .navbarH .navbarCon .search .icon-xiazai5 {
+    font-size: 34rpx;
+    margin-right: 16rpx;
+}

+ 16 - 17
view/xcx/components/orderGoods/index.js

@@ -1,21 +1,20 @@
 var app = getApp();
+
 Component({
-  properties: {
-    evaluate: {
-      type: Number,
-      value:0,
+    properties: {
+        evaluate: {
+            type: Number,
+            value: 0,
+        },
+        cartInfo: {
+            type: Object,
+            value: [],
+        },
+        orderId: {
+            type: String,
+            value: '',
+        },
     },
-    cartInfo:{
-      type:Object,
-      value:[],
-    },
-    orderId:{
-      type:String,
-      value:'',
-    },
-  },
-  data: {
-  },
-  methods: {
-  }
+    data: {},
+    methods: {}
 })

+ 4 - 4
view/xcx/components/orderGoods/index.json

@@ -1,4 +1,4 @@
-{
-  "usingComponents": {},
-  "component": true
-}
+ {
+     "usingComponents": {},
+     "component": true
+ }

+ 23 - 20
view/xcx/components/orderGoods/index.wxml

@@ -1,22 +1,25 @@
 <view class="orderGoods">
-  <view class='total'>共{{cartInfo.length}}件商品</view>
-  <view class='goodWrapper'>
-     <view class='item acea-row row-between-wrapper' wx:for="{{cartInfo}}" wx:key='index'>
-        <view class='pictrue'>
-          <image src='{{item.productInfo.attrInfo.image}}' wx:if="{{item.productInfo.attrInfo}}"></image>
-          <image src='{{item.productInfo.image}}' wx:else></image>
+    <view class='total'>共{{cartInfo.length}}件商品</view>
+    <view class='goodWrapper'>
+        <view class='item acea-row row-between-wrapper' wx:for="{{cartInfo}}" wx:key='index'>
+            <view class='pictrue'>
+                <image src='{{item.productInfo.attrInfo.image}}' wx:if="{{item.productInfo.attrInfo}}"></image>
+                <image src='{{item.productInfo.image}}' wx:else></image>
+            </view>
+            <view class='text'>
+                <view class='acea-row row-between-wrapper'>
+                    <view class='name line1 {{ item.reparation && "font-color"}}'>{{item.productInfo.store_name +
+                        (item.reparation && " -- 已赔付") }}</view>
+                    <view class='num'>x {{item.cart_num}}</view>
+                </view>
+                <view class='attr line1' wx:if="{{item.productInfo.attrInfo}}">{{item.productInfo.attrInfo.suk}}</view>
+                <view class='money font-color' wx:if="{{item.productInfo.attrInfo}}">
+                    ¥{{item.productInfo.attrInfo.price}}</view>
+                <view class='money font-color' wx:else>¥{{item.productInfo.price}}</view>
+                <navigator class='evaluate font-color' wx:if='{{item.is_reply==0 && evaluate==3}}' hover-class="none"
+                    url='/pages/goods_comment_con/index?unique={{item.unique}}&uni={{orderId}}'>评价</navigator>
+                <view class='evaluate' wx:elif='{{item.is_reply==1 && evaluate==3}}'>已评价</view>
+            </view>
         </view>
-        <view class='text'>
-           <view class='acea-row row-between-wrapper'>
-             <view class='name line1 {{ item.reparation && "font-color"}}'>{{item.productInfo.store_name + (item.reparation && " -- 已赔付") }}</view>
-             <view class='num'>x {{item.cart_num}}</view>
-           </view>
-           <view class='attr line1' wx:if="{{item.productInfo.attrInfo}}">{{item.productInfo.attrInfo.suk}}</view>
-           <view class='money font-color' wx:if="{{item.productInfo.attrInfo}}">¥{{item.productInfo.attrInfo.price}}</view>
-           <view class='money font-color' wx:else>¥{{item.productInfo.price}}</view>
-           <navigator class='evaluate font-color' wx:if='{{item.is_reply==0 && evaluate==3}}' hover-class="none" url='/pages/goods_comment_con/index?unique={{item.unique}}&uni={{orderId}}'>评价</navigator>
-           <view class='evaluate' wx:elif='{{item.is_reply==1 && evaluate==3}}'>已评价</view>
-        </view>
-     </view>
-  </view>
-</view>
+    </view>
+</view>

+ 13 - 3
view/xcx/components/orderGoods/index.wxss

@@ -1,6 +1,16 @@
 @import '/app.wxss';
-.orderGoods{background-color:#fff;margin-top:12rpx;}
-.orderGoods .total{width:100%;height:86rpx;padding:0 30rpx;border-bottom:2rpx solid #f0f0f0;font-size:30rpx;color:#282828;line-height:86rpx;}
-
 
+.orderGoods {
+    background-color: #fff;
+    margin-top: 12rpx;
+}
 
+.orderGoods .total {
+    width: 100%;
+    height: 86rpx;
+    padding: 0 30rpx;
+    border-bottom: 2rpx solid #f0f0f0;
+    font-size: 30rpx;
+    color: #282828;
+    line-height: 86rpx;
+}

+ 129 - 84
view/xcx/components/payment/index.js

@@ -1,92 +1,137 @@
-import {  orderPay } from '../../api/order.js';
+import {
+    orderPay
+} from '../../api/order.js';
 
 const app = getApp();
 
 Component({
-  properties: {
-    payMode:{
-      type:Array,
-      value:[],
+    properties: {
+        payMode: {
+            type: Array,
+            value: [],
+        },
+        pay_close: {
+            type: Boolean,
+            value: false,
+        },
+        order_id: {
+            type: String,
+            value: ''
+        },
+        totalPrice: {
+            type: String,
+            value: '0'
+        },
     },
-    pay_close:{
-      type:Boolean,
-      value:false,
-    },
-    order_id:{
-      type:String,
-      value:''
-    },
-    totalPrice:{
-      type:String,
-      value:'0'
-    },
-  },
-  data: {
-  },
-  attached: function () {
-  },
-  methods: {
-    close:function(){
-      this.triggerEvent('onChangeFun',{action:'pay_close'});
-    },
-    goPay:function(e){
-      let that = this;
-      let paytype = e.currentTarget.dataset.value;
-      let number = e.currentTarget.dataset.number
-      if (!that.data.order_id) return app.Tips({title:'请选择要支付的订单'});
-      if (paytype == 'yue' && parseFloat(number) < parseFloat(that.data.totalPrice)) return app.Tips({ title: '余额不足!' });
-      wx.showLoading({ title: '支付中' });
-      orderPay({ uni: that.data.order_id, paytype: paytype, 'from': 'routine' }).then(res => {
-        switch (paytype){
-          case 'weixin':
-            if (res.data.result === undefined) return app.Tips({title:'缺少支付参数'});
-            var jsConfig = res.data.result.jsConfig;
-            wx.requestPayment({
-              timeStamp: jsConfig.timestamp,
-              nonceStr: jsConfig.nonceStr,
-              package: jsConfig.package,
-              signType: jsConfig.signType,
-              paySign: jsConfig.paySign,
-              success: function (res) {
-                wx.hideLoading();
-                return app.Tips({ title: res.msg, icon: 'success' }, () => {
-                  that.triggerEvent('onChangeFun', { action: 'pay_complete' });
-                });
-              },
-              fail: function (e) {
-                wx.hideLoading();
-                return app.Tips({ title: '取消支付' }, () => {
-                  that.triggerEvent('onChangeFun', { action: 'pay_fail' });
-                });
-              },
-              complete: function (e) {
+
+    data: {},
+
+    attached: function () {},
+
+    methods: {
+        close: function () {
+            this.triggerEvent('onChangeFun', {
+                action: 'pay_close'
+            });
+        },
+        
+        goPay: function (e) {
+            let that = this;
+            let paytype = e.currentTarget.dataset.value;
+            let number = e.currentTarget.dataset.number
+            if (!that.data.order_id) return app.Tips({
+                title: '请选择要支付的订单'
+            });
+            if (paytype == 'yue' && parseFloat(number) < parseFloat(that.data.totalPrice)) return app.Tips({
+                title: '余额不足!'
+            });
+            wx.showLoading({
+                title: '支付中'
+            });
+            orderPay({
+                uni: that.data.order_id,
+                paytype: paytype,
+                'from': 'routine'
+            }).then(res => {
+                switch (paytype) {
+                    case 'weixin':
+                        if (res.data.result === undefined) return app.Tips({
+                            title: '缺少支付参数'
+                        });
+                        var jsConfig = res.data.result.jsConfig;
+                        wx.requestPayment({
+                            timeStamp: jsConfig.timestamp,
+                            nonceStr: jsConfig.nonceStr,
+                            package: jsConfig.package,
+                            signType: jsConfig.signType,
+                            paySign: jsConfig.paySign,
+                            success: function (res) {
+                                wx.hideLoading();
+                                return app.Tips({
+                                    title: res.msg,
+                                    icon: 'success'
+                                }, () => {
+                                    that.triggerEvent('onChangeFun', {
+                                        action: 'pay_complete'
+                                    });
+                                });
+                            },
+                            fail: function (e) {
+                                wx.hideLoading();
+                                return app.Tips({
+                                    title: '取消支付'
+                                }, () => {
+                                    that.triggerEvent('onChangeFun', {
+                                        action: 'pay_fail'
+                                    });
+                                });
+                            },
+                            complete: function (e) {
+                                wx.hideLoading();
+                                if (e.errMsg == 'requestPayment:cancel') return app.Tips({
+                                    title: '取消支付'
+                                }, () => {
+                                    that.triggerEvent('onChangeFun', {
+                                        action: 'pay_fail'
+                                    });
+                                });
+                            },
+                        });
+                        break;
+                    case 'yue':
+                        wx.hideLoading();
+                        return app.Tips({
+                            title: res.msg,
+                            icon: 'success'
+                        }, () => {
+                            that.triggerEvent('onChangeFun', {
+                                action: 'pay_complete'
+                            });
+                        });;
+                        break;
+                    case 'offline':
+                        wx.hideLoading();
+                        return app.Tips({
+                            title: res.msg,
+                            icon: 'success'
+                        }, () => {
+                            that.triggerEvent('onChangeFun', {
+                                action: 'pay_complete'
+                            });
+                        });;
+                        break;
+                }
+            }).catch(err => {
                 wx.hideLoading();
-                if (e.errMsg == 'requestPayment:cancel') return app.Tips({ title: '取消支付' }, () => {
-                  that.triggerEvent('onChangeFun', { action: 'pay_fail' });
+                return app.Tips({
+                    title: err
+                }, () => {
+                    that.triggerEvent('onChangeFun', {
+                        action: 'pay_fail'
+                    });
                 });
-              },
-            });
-          break;
-          case 'yue':
-            wx.hideLoading();
-            return app.Tips({ title: res.msg, icon: 'success' }, () => {
-              that.triggerEvent('onChangeFun', { action: 'pay_complete' });
-            });;
-          break;
-          case 'offline':
-            wx.hideLoading();
-            return app.Tips({ title: res.msg, icon: 'success' }, () => {
-              that.triggerEvent('onChangeFun', { action: 'pay_complete' });
-            });;
-          break;
-        }
-      }).catch(err => {
-        wx.hideLoading();
-        return app.Tips({ title: err }, () => {
-          that.triggerEvent('onChangeFun', { action: 'pay_fail' });
-        });
-      })
-    },
-  }
-  
+            })
+        },
+    }
+
 })

+ 2 - 2
view/xcx/components/payment/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 13 - 12
view/xcx/components/payment/index.wxml

@@ -1,19 +1,20 @@
 <view class="payment {{pay_close ? 'on' : ''}}">
-      <view class="title acea-row row-center-wrapper">
+    <view class="title acea-row row-center-wrapper">
         选择付款方式<text class="iconfont icon-guanbi" bindtap='close'></text>
-      </view>
-      <view class="item acea-row row-between-wrapper" bindtap='goPay' data-number="{{item.number || 0}}" data-value='{{item.value}}' wx:for="{{payMode}}" wx:key='index'>
+    </view>
+    <view class="item acea-row row-between-wrapper" bindtap='goPay' data-number="{{item.number || 0}}"
+        data-value='{{item.value}}' wx:for="{{payMode}}" wx:key='index'>
         <view class="left acea-row row-between-wrapper">
-          <view class="iconfont {{item.icon}}"></view>
-          <view class="text">
-            <view class="name">{{item.name}}</view>
-            <view class="info" wx:if="{{item.number}}">
-            {{item.title}} <span class="money">¥{{ item.number }}</span>
+            <view class="iconfont {{item.icon}}"></view>
+            <view class="text">
+                <view class="name">{{item.name}}</view>
+                <view class="info" wx:if="{{item.number}}">
+                    {{item.title}} <span class="money">¥{{ item.number }}</span>
+                </view>
+                <view class="info" wx:else>{{item.title}}</view>
             </view>
-            <view class="info" wx:else>{{item.title}}</view>
-          </view>
         </view>
         <view class="iconfont icon-xiangyou"></view>
-      </view>
     </view>
-    <view class="mask" wx:if='{{pay_close}}' bindtap='close'></view>
+</view>
+<view class="mask" wx:if='{{pay_close}}' bindtap='close'></view>

+ 46 - 45
view/xcx/components/payment/index.wxss

@@ -1,91 +1,92 @@
 @import '/font/iconfont.wxss';
 @import '/app.wxss';
+
 .payment {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  border-radius: 16rpx 16rpx 0 0;
-  background-color: #fff;
-  padding-bottom: 60rpx;
-  z-index: 99;
-  transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
-  transform: translate3d(0, 100%, 0);
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    border-radius: 16rpx 16rpx 0 0;
+    background-color: #fff;
+    padding-bottom: 60rpx;
+    z-index: 99;
+    transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
+    transform: translate3d(0, 100%, 0);
 }
 
 .payment.on {
-  transform: translate3d(0, 0, 0);
+    transform: translate3d(0, 0, 0);
 }
 
 .payment .title {
-  text-align: center;
-  height: 123rpx;
-  font-size: 32rpx;
-  color: #282828;
-  font-weight: bold;
-  padding-right: 30rpx;
-  margin-left: 30rpx;
-  position: relative;
-  border-bottom: 1rpx solid #eee;
+    text-align: center;
+    height: 123rpx;
+    font-size: 32rpx;
+    color: #282828;
+    font-weight: bold;
+    padding-right: 30rpx;
+    margin-left: 30rpx;
+    position: relative;
+    border-bottom: 1rpx solid #eee;
 }
 
 .payment .title .iconfont {
-  position: absolute;
-  right: 30rpx;
-  top: 50%;
-  transform: translateY(-50%);
-  font-size: 43rpx;
-  color: #8a8a8a;
-  font-weight: normal;
+    position: absolute;
+    right: 30rpx;
+    top: 50%;
+    transform: translateY(-50%);
+    font-size: 43rpx;
+    color: #8a8a8a;
+    font-weight: normal;
 }
 
 .payment .item {
-  border-bottom: 1rpx solid #eee;
-  height: 130rpx;
-  margin-left: 30rpx;
-  padding-right: 30rpx;
+    border-bottom: 1rpx solid #eee;
+    height: 130rpx;
+    margin-left: 30rpx;
+    padding-right: 30rpx;
 }
 
 .payment .item .left {
-  width: 610rpx;
+    width: 610rpx;
 }
 
 .payment .item .left .text {
-  width: 540rpx;
+    width: 540rpx;
 }
 
 .payment .item .left .text .name {
-  font-size: 32rpx;
-  color: #282828;
+    font-size: 32rpx;
+    color: #282828;
 }
 
 .payment .item .left .text .info {
-  font-size: 24rpx;
-  color: #999;
+    font-size: 24rpx;
+    color: #999;
 }
 
 .payment .item .left .text .info .money {
-  color: #ff9900;
+    color: #ff9900;
 }
 
 .payment .item .left .iconfont {
-  font-size: 45rpx;
-  color: #09bb07;
+    font-size: 45rpx;
+    color: #09bb07;
 }
 
 .payment .item .left .iconfont.icon-zhifubao {
-  color: #00aaea;
+    color: #00aaea;
 }
 
 .payment .item .left .iconfont.icon-yuezhifu {
-  color: #ff9900;
+    color: #ff9900;
 }
 
 .payment .item .left .iconfont.icon-yuezhifu1 {
-  color: #eb6623;
+    color: #eb6623;
 }
 
 .payment .item .iconfont {
-  font-size: 0.3rpx;
-  color: #999;
+    font-size: 0.3rpx;
+    color: #999;
 }

+ 161 - 121
view/xcx/components/price-change/index.js

@@ -1,130 +1,170 @@
 import {
-  getAdminOrderList,
-  setAdminOrderPrice,
-  setAdminOrderRemark,
-  setOfflinePay,
-  setOrderRefund
+    getAdminOrderList,
+    setAdminOrderPrice,
+    setAdminOrderRemark,
+    setOfflinePay,
+    setOrderRefund
 } from "../../api/admin";
+
 const app = getApp();
+
 Component({
-  properties: {
-    orderInfo:{
-      type:Object,
-      value:null,
+    properties: {
+        orderInfo: {
+            type: Object,
+            value: null,
+        },
+        change: {
+            type: Boolean,
+            value: false,
+        },
+        status: {
+            type: Number,
+            value: 0
+        }
     },
-    change:{
-      type:Boolean,
-      value:false,
+
+    data: {
+        remark: '', //备注信息
+        price: '', //实际支付
+        refund_price: '' //退款金额
     },
-    status:{
-      type:Number,
-      value:0
-    }
-  },
-  data: {
-    remark: '',//备注信息
-    price: '',//实际支付
-    refund_price: ''//退款金额
-  },
-  attached: function () {
-    this.setData({ price: this.properties.orderInfo.pay_price ? this.properties.orderInfo.pay_price : ''});
-  },
-  methods: {
-     /**
-    * 事件回调 
-    */
-    bindHideKeyboard: function (e) {
-      this.setData({ remark: e.detail.value });
-    },
-     /**
-    * 实际支付
-    */
-    bindPrice: function (e) {
-      this.setData({ price: e.detail.value });
-    },
-     /**
-    * 退款金额
-    */
-    bindRefundPrice: function(e) {
-      this.setData({ refund_price: e.detail.value });
-    },
-     /**
-    * 提交
-    */
-    save: function (e) {
-      let type = e.currentTarget.dataset.type;
-      this.savePrice(type);
-    },
-     /**
-    * 拒绝退款
-    */
-    refuse: function (e) {
-      let type = e.currentTarget.dataset.type;
-      this.savePrice(type);
-    },
-    /**
-    * 事件回调
-    * 
-    */
-    savePrice: function (type) {
-      let that = this,
-        data = {},
-        price = this.data.price,
-        remark = this.data.remark,
-        refund_price = this.data.refund_price;
-        data.order_id = that.data.orderInfo.order_id;
-      if (that.data.status == 0 && that.data.orderInfo.refund_status === 0) {
-        if (!that.data.price) return app.Tips({ title: '请输入价格' });
-        data.price = price;
-        // 订单改价
-        setAdminOrderPrice(data).then(
-          function () {
-            that.close();
-            app.Tips({ title: '改价成功' });
-            that.triggerEvent('getIndex');
-          },
-          function () {
-            that.close();
-            app.Tips({ title: '改价失败' });
-          }
-        );
-      } else if (that.data.status == 0 && that.data.orderInfo.refund_status == 1) {
-        if (type === '1' && !refund_price) return app.Tips({ title: '请输入退款金额' });
-        data.price = refund_price;
-        data.type = type;
-         // 确认退款 拒绝退款
-        setOrderRefund(data).then(
-          res => {
-            that.close();
-            app.Tips({ title: res.msg });
-            that.triggerEvent('getIndex');
-          },
-          err => {
-            that.close();
-            app.Tips({ title: err });
-          }
-        );
-      } else {
-        if(!this.data.remark) return app.Tips({ title: '请输入订单备注' });
-        data.remark = remark;
-        // 订单备注
-        setAdminOrderRemark(data).then(
-          res => {
-            that.close();
-            that.setData({ remark: '' });
-            that.triggerEvent('getIndex');
-            app.Tips({ title: res.msg });
-          },
-          err => {
-            that.close();
-            app.Tips({ title: err });
-          }
-        );
-      }
+
+    attached: function () {
+        this.setData({
+            price: this.properties.orderInfo.pay_price ? this.properties.orderInfo.pay_price : ''
+        });
     },
-    close:function(){
-      this.triggerEvent('onChangeFun',{action:'change'});
+
+    methods: {
+        /**
+         * 事件回调 
+         */
+        bindHideKeyboard: function (e) {
+            this.setData({
+                remark: e.detail.value
+            });
+        },
+
+        /**
+         * 实际支付
+         */
+        bindPrice: function (e) {
+            this.setData({
+                price: e.detail.value
+            });
+        },
+
+        /**
+         * 退款金额
+         */
+        bindRefundPrice: function (e) {
+            this.setData({
+                refund_price: e.detail.value
+            });
+        },
+
+        /**
+         * 提交
+         */
+        save: function (e) {
+            let type = e.currentTarget.dataset.type;
+            this.savePrice(type);
+        },
+
+        /**
+         * 拒绝退款
+         */
+        refuse: function (e) {
+            let type = e.currentTarget.dataset.type;
+            this.savePrice(type);
+        },
+
+        /**
+         * 事件回调
+         */
+        savePrice: function (type) {
+            let that = this,
+                data = {},
+                price = this.data.price,
+                remark = this.data.remark,
+                refund_price = this.data.refund_price;
+            data.order_id = that.data.orderInfo.order_id;
+            if (that.data.status == 0 && that.data.orderInfo.refund_status === 0) {
+                if (!that.data.price) return app.Tips({
+                    title: '请输入价格'
+                });
+                data.price = price;
+                // 订单改价
+                setAdminOrderPrice(data).then(
+                    function () {
+                        that.close();
+                        app.Tips({
+                            title: '改价成功'
+                        });
+                        that.triggerEvent('getIndex');
+                    },
+                    function () {
+                        that.close();
+                        app.Tips({
+                            title: '改价失败'
+                        });
+                    }
+                );
+            } else if (that.data.status == 0 && that.data.orderInfo.refund_status == 1) {
+                if (type === '1' && !refund_price) return app.Tips({
+                    title: '请输入退款金额'
+                });
+                data.price = refund_price;
+                data.type = type;
+                // 确认退款 拒绝退款
+                setOrderRefund(data).then(
+                    res => {
+                        that.close();
+                        app.Tips({
+                            title: res.msg
+                        });
+                        that.triggerEvent('getIndex');
+                    },
+                    err => {
+                        that.close();
+                        app.Tips({
+                            title: err
+                        });
+                    }
+                );
+            } else {
+                if (!this.data.remark) return app.Tips({
+                    title: '请输入订单备注'
+                });
+                data.remark = remark;
+                // 订单备注
+                setAdminOrderRemark(data).then(
+                    res => {
+                        that.close();
+                        that.setData({
+                            remark: ''
+                        });
+                        that.triggerEvent('getIndex');
+                        app.Tips({
+                            title: res.msg
+                        });
+                    },
+                    err => {
+                        that.close();
+                        app.Tips({
+                            title: err
+                        });
+                    }
+                );
+            }
+        },
+        
+        close: function () {
+            this.triggerEvent('onChangeFun', {
+                action: 'change'
+            });
+        }
     }
-  }
-  
+
 })

+ 2 - 2
view/xcx/components/price-change/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 39 - 57
view/xcx/components/price-change/index.wxml

@@ -1,69 +1,51 @@
 <view class="priceChange" class="priceChange {{change ? 'on' : ''}}">
-     <view class="priceTitle">
+    <view class="priceTitle">
         {{status == 0? orderInfo.refund_status === 1? "立即退款": "一键改价": "订单备注"}}
         <span class="iconfont icon-guanbi" bindtap="close"></span>
-      </view>
-      <view class="listChange"  wx:if="{{status == 0}}">
-        <view
-          class="item acea-row row-between-wrapper"
-          wx:if="{{orderInfo.refund_status === 0}}"
-        >
-          <view>商品总价(¥)</view>
-          <view class="money">
-            {{ orderInfo.total_price }}<span class="iconfont icon-suozi"></span>
-          </view>
+    </view>
+    <view class="listChange" wx:if="{{status == 0}}">
+        <view class="item acea-row row-between-wrapper" wx:if="{{orderInfo.refund_status === 0}}">
+            <view>商品总价(¥)</view>
+            <view class="money">
+                {{ orderInfo.total_price }}<span class="iconfont icon-suozi"></span>
+            </view>
         </view>
-        <view
-          class="item acea-row row-between-wrapper"
-          wx:if="{{orderInfo.refund_status === 0}}"
-        >
-          <view>原始邮费(¥)</view>
-          <view class="money">
-            {{ orderInfo.pay_postage }}<span class="iconfont icon-suozi"></span>
-          </view>
+        <view class="item acea-row row-between-wrapper" wx:if="{{orderInfo.refund_status === 0}}">
+            <view>原始邮费(¥)</view>
+            <view class="money">
+                {{ orderInfo.pay_postage }}<span class="iconfont icon-suozi"></span>
+            </view>
         </view>
-        <view
-          class="item acea-row row-between-wrapper"
-          wx:if="{{orderInfo.refund_status === 0}}"
-        >
-          <view>实际支付(¥)</view>
-          <view class="money">
-            <input
-              type="text"
-              bindinput="bindPrice" data-name="orderInfo.pay_price" value='{{orderInfo.pay_price}}'
-              class="{{focus === true ? 'on' : ''}}"/>
-          </view>
+        <view class="item acea-row row-between-wrapper" wx:if="{{orderInfo.refund_status === 0}}">
+            <view>实际支付(¥)</view>
+            <view class="money">
+                <input type="text" bindinput="bindPrice" data-name="orderInfo.pay_price" value='{{orderInfo.pay_price}}'
+                    class="{{focus === true ? 'on' : ''}}" />
+            </view>
         </view>
-        <view
-          class="item acea-row row-between-wrapper"
-          wx:if="{{orderInfo.refund_status === 1}}"
-        >
-          <view>实际支付(¥)</view>
-          <view class="money">
-            {{ orderInfo.pay_price }}<span class="iconfont icon-suozi"></span>
-          </view>
+        <view class="item acea-row row-between-wrapper" wx:if="{{orderInfo.refund_status === 1}}">
+            <view>实际支付(¥)</view>
+            <view class="money">
+                {{ orderInfo.pay_price }}<span class="iconfont icon-suozi"></span>
+            </view>
         </view>
-        <view
-          class="item acea-row row-between-wrapper"
-          wx:if="{{orderInfo.refund_status === 1}}"
-        >
-          <view>退款金额(¥)</view>
-          <view class="money">
-            <input
-              type="text"
-              bindinput="bindRefundPrice" data-name="refund_price" value='{{refund_price}}' class="{{focus === true ? 'on' : ''}}"
-            />
-          </view>
+        <view class="item acea-row row-between-wrapper" wx:if="{{orderInfo.refund_status === 1}}">
+            <view>退款金额(¥)</view>
+            <view class="money">
+                <input type="text" bindinput="bindRefundPrice" data-name="refund_price" value='{{refund_price}}'
+                    class="{{focus === true ? 'on' : ''}}" />
+            </view>
         </view>
-      </view>
-      <view class="listChange" wx:else>
-        <textarea placeholder="{{orderInfo.remark ? orderInfo.remark : '请填写备注信息...'}}" bindinput="bindHideKeyboard" data-name="remark" value='{{remark}}'></textarea>
-      </view>
-      <view class="modify" bindtap="save" data-type="1">
+    </view>
+    <view class="listChange" wx:else>
+        <textarea placeholder="{{orderInfo.remark ? orderInfo.remark : '请填写备注信息...'}}" bindinput="bindHideKeyboard"
+            data-name="remark" value='{{remark}}'></textarea>
+    </view>
+    <view class="modify" bindtap="save" data-type="1">
         {{ status === 1 || orderInfo.refund_status === 0 ? "立即修改" : "确认退款" }}
-      </view>
-      <view class="modify1" bindtap="refuse" data-type="2" wx:if="{{orderInfo.refund_status === 1 && status === 0}}">
+    </view>
+    <view class="modify1" bindtap="refuse" data-type="2" wx:if="{{orderInfo.refund_status === 1 && status === 0}}">
         拒绝退款
-      </view>
     </view>
+</view>
 <view class="mask" wx:if='{{change}}' bindtap='close'></view>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 4
view/xcx/components/price-change/index.wxss


+ 107 - 91
view/xcx/components/product-window/index.js

@@ -1,98 +1,114 @@
 var app = getApp();
+
 Component({
-  properties: {
-    iSplus:{
-      type: Boolean,
-      value: true
+    properties: {
+        iSplus: {
+            type: Boolean,
+            value: true
+        },
+        iSbnt: {
+            type: Number,
+            value: 0
+        },
+        limitNum: {
+            type: Number,
+            value: 0
+        },
+        attribute: {
+            type: Object,
+            value: {}
+        },
+        attrList: {
+            type: Object,
+            value: [],
+        },
+        productAttr: {
+            type: Object,
+            value: [],
+        },
+        productSelect: {
+            type: Object,
+            value: {
+                image: '',
+                store_name: '',
+                price: 0,
+                unique: '',
+                stock: 0,
+            }
+        },
     },
-    iSbnt:{
-      type:Number,
-      value:0
+
+    data: {
+        attrValue: [],
+        attrIndex: 0,
+        isShow: false
     },
-    limitNum:{
-      type: Number,
-      value: 0
+
+    attached: function () {
+        let pages = getCurrentPages();
+        let currPage = null;
+        if (pages.length) {
+            currPage = pages[pages.length - 1];
+        }
+        let route = currPage.route
+        this.setData({
+            isShow: route.indexOf("goods_details") !== -1
+        });
     },
-    attribute: {
-      type: Object,
-      value:{}
-    },
-    attrList:{
-      type: Object,
-      value:[],
-    },
-    productAttr:{
-      type: Object,
-      value: [],
-    },
-    productSelect:{
-      type: Object,
-      value: {
-        image: '',
-        store_name: '',
-        price: 0,
-        unique: '',
-        stock:0,
-      }
-    },
-  },
-  data: {
-    attrValue:[],
-    attrIndex:0,
-    isShow: false
-  },
-  attached: function () {
-    let pages = getCurrentPages();
-    let currPage = null;
-    if (pages.length) {
-      currPage = pages[pages.length - 1];
+
+    methods: {
+        /**
+         * 购物车手动输入数量
+         */
+        bindCode: function (e) {
+            this.triggerEvent('iptCartNum', e.detail.value);
+        },
+
+        close: function () {
+            this.triggerEvent('myevent', {
+                'window': false
+            });
+        },
+
+        goCat: function () {
+            this.triggerEvent('goCat');
+        },
+
+        CartNumDes: function () {
+            this.triggerEvent('ChangeCartNum', false);
+        },
+
+        CartNumInt: function () {
+            this.triggerEvent('ChangeCartNum', true);
+        },
+
+        tapAttr: function (e) {
+            //父级index
+            var indexw = e.currentTarget.dataset.indexw;
+            //子集index
+            var indexn = e.currentTarget.dataset.indexn;
+            //每次点击获得的属性
+            var attr = this.data.productAttr[indexw].attr_value[indexn];
+            //设置当前点击属性
+            this.data.productAttr[indexw].checked = attr['attr'];
+            this.setData({
+                productAttr: this.data.productAttr,
+            });
+            var value = this.getCheckedValue().sort().join(',');
+            this.triggerEvent('ChangeAttr', value);
+        },
+
+        getCheckedValue: function () {
+            return this.data.productAttr.map(function (attr) {
+                return attr.checked;
+            });
+        },
+        
+        ResetAttr: function () {
+            for (var k in this.data.productAttr) this.data.productAttr[k].checked = '';
+            this.setData({
+                productAttr: this.data.productAttr
+            });
+        },
     }
-    let route = currPage.route
-    this.setData({ isShow: route.indexOf("goods_details")!==-1});
-  },
-  methods: {
-    /**
-    * 购物车手动输入数量
-    * 
-    */
-    bindCode: function (e) {
-      this.triggerEvent('iptCartNum', e.detail.value);
-    },
-    close: function () {
-      this.triggerEvent('myevent', {'window': false});
-    },
-    goCat:function(){
-      this.triggerEvent('goCat');
-    },
-    CartNumDes:function(){
-      this.triggerEvent('ChangeCartNum', false);
-    },
-    CartNumInt:function(){
-      this.triggerEvent('ChangeCartNum', true);
-    },
-    tapAttr:function(e){
-      //父级index
-      var indexw = e.currentTarget.dataset.indexw;
-      //子集index
-      var indexn = e.currentTarget.dataset.indexn;
-      //每次点击获得的属性
-      var attr = this.data.productAttr[indexw].attr_value[indexn];
-      //设置当前点击属性
-      this.data.productAttr[indexw].checked = attr['attr'];
-      this.setData({
-        productAttr: this.data.productAttr,
-      });
-      var value = this.getCheckedValue().sort().join(',');
-      this.triggerEvent('ChangeAttr',value);
-    },
-    getCheckedValue: function () {
-      return this.data.productAttr.map(function (attr) {
-        return attr.checked;
-      });
-    },
-    ResetAttr:function(){
-      for (var k in this.data.productAttr) this.data.productAttr[k].checked='';
-      this.setData({ productAttr: this.data.productAttr});
-    },
-  }
 })

+ 2 - 2
view/xcx/components/product-window/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 44 - 34
view/xcx/components/product-window/index.wxml

@@ -1,36 +1,46 @@
 <view class='product-window {{attribute.cartAttr==true?"on":""}} {{iSbnt?"join":""}}'>
-   <view class='textpic acea-row row-between-wrapper'>
-      <view class='pictrue'><image src='{{productSelect.image}}'></image></view>
-      <view class='text'>
-         <view class='line1'>{{productSelect.store_name}}</view>
-         <view class='money font-color'>
-          ¥<text class='num'>{{productSelect.price}}</text>
-          <text class='stock' wx:if="{{isShow}}">库存: {{productSelect.stock}}</text>
-          <text class='stock' wx:if="{{limitNum}}">限量: {{productSelect.quota_show}}</text>
-         </view>
-      </view>
-      <view class='iconfont icon-guanbi' bindtap='close'></view>
-   </view>
-   <view class='productWinList'>
-      <view class='item' wx:for='{{productAttr}}' wx:key='index'>
-         <view class='title'>{{item.attr_name}}</view>
-         <view class='listn acea-row row-middle'>
-            <view class='itemn {{item.checked==itemn.attr ?"on":""}}' wx:for='{{item.attr_value}}' wx:for-item='itemn' wx:for-index='indexn' data-indexw='{{index}}' data-indexn='{{indexn}}' bindtap='tapAttr' wx:key='index'>{{itemn.attr}}</view>
-         </view>
-      </view>
-   </view>
-   <view class='cart'>
-       <view class='title'>数量</view>
-       <view class='carnum acea-row row-left'>
-          <view class='reduce {{productSelect.cart_num <= 1 ? "on":""}}' bindtap='CartNumDes'>-</view>
-          <view class='num'>
-             <input type="number" value="{{productSelect.cart_num}}" data-name="productSelect.cart_num" bindinput="bindCode"></input>
-          </view>
-          <view wx:if="{{iSplus}}" class='plus {{productSelect.cart_num >= productSelect.stock? "on":""}}' bindtap='CartNumInt'>+</view>
-          <view wx:else class='plus {{(productSelect.cart_num >= productSelect.quota_show) || (productSelect.cart_num >= productSelect.product_stock) || (productSelect.cart_num >= productSelect.num)? "on":""}}' bindtap='CartNumInt'>+</view>
-       </view>
-   </view>
-   <view class="joinBnt bg-color" wx:if="{{iSbnt && productSelect.product_stock>0 &&productSelect.quota>0}}" bindtap="goCat">我要参团</view>
-   <view class="joinBnt on" wx:elif="{{(iSbnt && productSelect.quota<=0)||(iSbnt &&productSelect.product_stock<=0)}}">已售罄</view>
+    <view class='textpic acea-row row-between-wrapper'>
+        <view class='pictrue'>
+            <image src='{{productSelect.image}}'></image>
+        </view>
+        <view class='text'>
+            <view class='line1'>{{productSelect.store_name}}</view>
+            <view class='money font-color'>
+                ¥<text class='num'>{{productSelect.price}}</text>
+                <text class='stock' wx:if="{{isShow}}">库存: {{productSelect.stock}}</text>
+                <text class='stock' wx:if="{{limitNum}}">限量: {{productSelect.quota_show}}</text>
+            </view>
+        </view>
+        <view class='iconfont icon-guanbi' bindtap='close'></view>
+    </view>
+    <view class='productWinList'>
+        <view class='item' wx:for='{{productAttr}}' wx:key='index'>
+            <view class='title'>{{item.attr_name}}</view>
+            <view class='listn acea-row row-middle'>
+                <view class='itemn {{item.checked==itemn.attr ?"on":""}}' wx:for='{{item.attr_value}}'
+                    wx:for-item='itemn' wx:for-index='indexn' data-indexw='{{index}}' data-indexn='{{indexn}}'
+                    bindtap='tapAttr' wx:key='index'>{{itemn.attr}}</view>
+            </view>
+        </view>
+    </view>
+    <view class='cart'>
+        <view class='title'>数量</view>
+        <view class='carnum acea-row row-left'>
+            <view class='reduce {{productSelect.cart_num <= 1 ? "on":""}}' bindtap='CartNumDes'>-</view>
+            <view class='num'>
+                <input type="number" value="{{productSelect.cart_num}}" data-name="productSelect.cart_num"
+                    bindinput="bindCode"></input>
+            </view>
+            <view wx:if="{{iSplus}}" class='plus {{productSelect.cart_num >= productSelect.stock? "on":""}}'
+                bindtap='CartNumInt'>+</view>
+            <view wx:else
+                class='plus {{(productSelect.cart_num >= productSelect.quota_show) || (productSelect.cart_num >= productSelect.product_stock) || (productSelect.cart_num >= productSelect.num)? "on":""}}'
+                bindtap='CartNumInt'>+</view>
+        </view>
+    </view>
+    <view class="joinBnt bg-color" wx:if="{{iSbnt && productSelect.product_stock>0 &&productSelect.quota>0}}"
+        bindtap="goCat">我要参团</view>
+    <view class="joinBnt on" wx:elif="{{(iSbnt && productSelect.quota<=0)||(iSbnt &&productSelect.product_stock<=0)}}">
+        已售罄</view>
 </view>
-<view class='mask' catchtouchmove="true" hidden='{{attribute.cartAttr==false}}' bindtap='close'></view>
+<view class='mask' catchtouchmove="true" hidden='{{attribute.cartAttr==false}}' bindtap='close'></view>

+ 168 - 28
view/xcx/components/product-window/index.wxss

@@ -1,30 +1,170 @@
 @import '/app.wxss';
-.product-window{position:fixed;bottom:0;width:100%;left:0;background-color:#fff;z-index:88;border-radius:16rpx 16rpx 0 0;padding-bottom:140rpx;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
-.product-window.on{transform:translate3d(0,0,0);}
-.product-window.join{padding-bottom: 30rpx;}
-.product-window .textpic{padding:0 130rpx 0 30rpx;margin-top:29rpx;position:relative;}
-.product-window .textpic .pictrue{width:150rpx;height:150rpx;}
-.product-window .textpic .pictrue image{width:100%;height:100%;border-radius:10rpx;}
-.product-window .textpic .text{width:410rpx;font-size:32rpx;color:#202020;}
-.product-window .textpic .text .money{font-size:24rpx;margin-top:40rpx;}
-.product-window .textpic .text .money .num{font-size:36rpx;}
-.product-window .textpic .text .money .stock{color:#999;margin-left:18rpx;}
-.product-window .textpic .iconfont{position:absolute;right:30rpx;top:-5rpx;font-size:35rpx;color:#8a8a8a;}
-.product-window .productWinList{max-height:395rpx;overflow:auto;margin-top:36rpx;}
-.product-window .productWinList .item~.item{margin-top:36rpx;}
-.product-window .productWinList .item .title{font-size:30rpx;color:#999;padding:0 30rpx;}
-.product-window .productWinList .item .listn{padding:0 30rpx 0 16rpx;}
-.product-window .productWinList .item .listn .itemn{border:1px solid #bbb;font-size:26rpx;color:#282828;padding:7rpx 33rpx;border-radius:6rpx;margin:14rpx 0 0 14rpx;}
-.product-window .productWinList .item .listn .itemn.on{color:#fff;background-color:#ff3700;border-color:#ff3700;}
-.product-window .cart{margin-top:36rpx;padding:0 30rpx;}
-.product-window .cart .title{font-size:30rpx;color:#999;}
-.product-window .cart .carnum{height:54rpx;margin-top:24rpx;}
-.product-window .cart .carnum view{border:1px solid #a4a4a4;width:84rpx;text-align:center;height:100%;line-height:54rpx;color:#a4a4a4;font-size:45rpx;}
-.product-window .cart .carnum .reduce{border-right:0;border-radius:6rpx 0 0 6rpx;line-height:48rpx;}
-.product-window .cart .carnum .reduce.on{border-color:#e3e3e3;color:#dedede;}
-.product-window .cart .carnum .plus{border-left:0;border-radius:0 6rpx 6rpx 0;line-height:46rpx;}
-.product-window .cart .carnum .plus.on{border-color:#e3e3e3;color:#dedede;}
-.product-window .cart .carnum .num{color:#282828;font-size:28rpx;}
-.product-window .joinBnt{font-size: 30rpx;width: 620rpx;height: 86rpx;border-radius: 50rpx;text-align: center;line-height: 86rpx;color: #fff;margin: 21rpx auto 0 auto;}
-.product-window .joinBnt.on{background-color:#bbb;color:#fff;}
 
+.product-window {
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    left: 0;
+    background-color: #fff;
+    z-index: 88;
+    border-radius: 16rpx 16rpx 0 0;
+    padding-bottom: 140rpx;
+    transform: translate3d(0, 100%, 0);
+    transition: all .3s cubic-bezier(.25, .5, .5, .9);
+}
+
+.product-window.on {
+    transform: translate3d(0, 0, 0);
+}
+
+.product-window.join {
+    padding-bottom: 30rpx;
+}
+
+.product-window .textpic {
+    padding: 0 130rpx 0 30rpx;
+    margin-top: 29rpx;
+    position: relative;
+}
+
+.product-window .textpic .pictrue {
+    width: 150rpx;
+    height: 150rpx;
+}
+
+.product-window .textpic .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 10rpx;
+}
+
+.product-window .textpic .text {
+    width: 410rpx;
+    font-size: 32rpx;
+    color: #202020;
+}
+
+.product-window .textpic .text .money {
+    font-size: 24rpx;
+    margin-top: 40rpx;
+}
+
+.product-window .textpic .text .money .num {
+    font-size: 36rpx;
+}
+
+.product-window .textpic .text .money .stock {
+    color: #999;
+    margin-left: 18rpx;
+}
+
+.product-window .textpic .iconfont {
+    position: absolute;
+    right: 30rpx;
+    top: -5rpx;
+    font-size: 35rpx;
+    color: #8a8a8a;
+}
+
+.product-window .productWinList {
+    max-height: 395rpx;
+    overflow: auto;
+    margin-top: 36rpx;
+}
+
+.product-window .productWinList .item~.item {
+    margin-top: 36rpx;
+}
+
+.product-window .productWinList .item .title {
+    font-size: 30rpx;
+    color: #999;
+    padding: 0 30rpx;
+}
+
+.product-window .productWinList .item .listn {
+    padding: 0 30rpx 0 16rpx;
+}
+
+.product-window .productWinList .item .listn .itemn {
+    border: 1px solid #bbb;
+    font-size: 26rpx;
+    color: #282828;
+    padding: 7rpx 33rpx;
+    border-radius: 6rpx;
+    margin: 14rpx 0 0 14rpx;
+}
+
+.product-window .productWinList .item .listn .itemn.on {
+    color: #fff;
+    background-color: #ff3700;
+    border-color: #ff3700;
+}
+
+.product-window .cart {
+    margin-top: 36rpx;
+    padding: 0 30rpx;
+}
+
+.product-window .cart .title {
+    font-size: 30rpx;
+    color: #999;
+}
+
+.product-window .cart .carnum {
+    height: 54rpx;
+    margin-top: 24rpx;
+}
+
+.product-window .cart .carnum view {
+    border: 1px solid #a4a4a4;
+    width: 84rpx;
+    text-align: center;
+    height: 100%;
+    line-height: 54rpx;
+    color: #a4a4a4;
+    font-size: 45rpx;
+}
+
+.product-window .cart .carnum .reduce {
+    border-right: 0;
+    border-radius: 6rpx 0 0 6rpx;
+    line-height: 48rpx;
+}
+
+.product-window .cart .carnum .reduce.on {
+    border-color: #e3e3e3;
+    color: #dedede;
+}
+
+.product-window .cart .carnum .plus {
+    border-left: 0;
+    border-radius: 0 6rpx 6rpx 0;
+    line-height: 46rpx;
+}
+
+.product-window .cart .carnum .plus.on {
+    border-color: #e3e3e3;
+    color: #dedede;
+}
+
+.product-window .cart .carnum .num {
+    color: #282828;
+    font-size: 28rpx;
+}
+
+.product-window .joinBnt {
+    font-size: 30rpx;
+    width: 620rpx;
+    height: 86rpx;
+    border-radius: 50rpx;
+    text-align: center;
+    line-height: 86rpx;
+    color: #fff;
+    margin: 21rpx auto 0 auto;
+}
+
+.product-window .joinBnt.on {
+    background-color: #bbb;
+    color: #fff;
+}

+ 37 - 35
view/xcx/components/productConSwiper/index.js

@@ -1,40 +1,42 @@
 var app = getApp();
+
 Component({
-  properties: {
-    imgUrls:{
-      type:Object,
-      value:[]
+    properties: {
+        imgUrls: {
+            type: Object,
+            value: []
+        },
+        videoline: {
+            type: String,
+            value: ""
+        }
     },
-    videoline: 
-      {
-        type:String,
-        value:""
-      }
-  },
-  data: {
-    indicatorDots: true,
-    circular: true,
-    autoplay: false,
-    interval: 3000,
-    duration: 500,
-    currents: "1",
-    controls:true
-  },
-  ready:function(){
-    this.videoContext = wx.createVideoContext('myVideo',this);
-  },
-  methods: {
-    bindPause:function(){
-      this.videoContext.play();
-       this.setData({
-        controls:false
-       });
+
+    data: {
+        indicatorDots: true,
+        circular: true,
+        autoplay: false,
+        interval: 3000,
+        duration: 500,
+        currents: "1",
+        controls: true
     },
-    change: function (e) {
-      this.setData({
-        currents: e.detail.current + 1
-      })
-    }
-  }
-})
 
+    ready: function () {
+        this.videoContext = wx.createVideoContext('myVideo', this);
+    },
+    
+    methods: {
+        bindPause: function () {
+            this.videoContext.play();
+            this.setData({
+                controls: false
+            });
+        },
+        change: function (e) {
+            this.setData({
+                currents: e.detail.current + 1
+            })
+        }
+    }
+})

+ 2 - 2
view/xcx/components/productConSwiper/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 21 - 20
view/xcx/components/productConSwiper/index.wxml

@@ -1,22 +1,23 @@
-    <view class='product-bg'>
-        <swiper  indicator-dots="{{indicatorDots}}" indicator-active-color="#e93323"
-            autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="change">
-            <swiper-item wx:if='{{videoline}}'>
-              <view class="item">
-                 <video id="myVideo" src='{{videoline}}' objectFit="cover" controls	 style="width:100%;height:100% " show-center-play-btn show-mute-btn="true" auto-pause-if-navigate  custom-cache="{{false}}"></video>
-                 <cover-view class="poster" wx:if="{{controls}}">
+<view class='product-bg'>
+    <swiper indicator-dots="{{indicatorDots}}" indicator-active-color="#e93323" autoplay="{{autoplay}}"
+        circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="change">
+        <swiper-item wx:if='{{videoline}}'>
+            <view class="item">
+                <video id="myVideo" src='{{videoline}}' objectFit="cover" controls style="width:100%;height:100% "
+                    show-center-play-btn show-mute-btn="true" auto-pause-if-navigate custom-cache="{{false}}"></video>
+                <cover-view class="poster" wx:if="{{controls}}">
                     <cover-image class="image" src="{{imgUrls[0]}}"></cover-image>
-                 </cover-view>
-                 <cover-view class="stop"  wx:if="{{controls}}" bindtap="bindPause">
-                     <cover-image class="image" src="../../images/stop.png"></cover-image>
-                 </cover-view>
-              </view>  
+                </cover-view>
+                <cover-view class="stop" wx:if="{{controls}}" bindtap="bindPause">
+                    <cover-image class="image" src="../../images/stop.png"></cover-image>
+                </cover-view>
+            </view>
+        </swiper-item>
+        <block wx:for="{{imgUrls}}" wx:key='index'>
+            <swiper-item>
+                <image src="{{item}}" class="slide-image" />
             </swiper-item>
-            <block wx:for="{{imgUrls}}" wx:key='index'> 
-                   <swiper-item>
-                <image src="{{item}}" class="slide-image"/>
-              </swiper-item>
-            </block>
-        </swiper>
-        <!-- <view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view> -->
-    </view>
+        </block>
+    </swiper>
+    <!-- <view class='pages'>{{currents}}/{{imgUrls.length || 1}}</view> -->
+</view>

+ 68 - 10
view/xcx/components/productConSwiper/index.wxss

@@ -1,10 +1,68 @@
-.product-bg{width:100%;height:750rpx;position:relative;}
-.product-bg swiper{width:100%;height:100%;position:relative;}
-.product-bg .slide-image{width:100%;height:100%;}
-.product-bg .pages{position:absolute;background-color:#fff;height:34rpx;padding:0 10rpx;border-radius:3rpx;right:30rpx;bottom:30rpx;line-height:34rpx;font-size:24rpx;color:#050505;}
-#myVideo{width: 100%;height: 100%}
-.product-bg .item{position:relative;width:100%;height:100%;}
-.product-bg .item .poster{position:absolute;top:0;left:0;height:750rpx;width:100%;}
-.product-bg .item .poster .image{width:100%;height:100%;}
-.product-bg .item .stop{position:absolute;top:50%;left:50%;width:136rpx;height:136rpx;margin-top:-68rpx;margin-left:-68rpx;}
-.product-bg .item .stop .image{width:100%;height:100%;}
+.product-bg {
+    width: 100%;
+    height: 750rpx;
+    position: relative;
+}
+
+.product-bg swiper {
+    width: 100%;
+    height: 100%;
+    position: relative;
+}
+
+.product-bg .slide-image {
+    width: 100%;
+    height: 100%;
+}
+
+.product-bg .pages {
+    position: absolute;
+    background-color: #fff;
+    height: 34rpx;
+    padding: 0 10rpx;
+    border-radius: 3rpx;
+    right: 30rpx;
+    bottom: 30rpx;
+    line-height: 34rpx;
+    font-size: 24rpx;
+    color: #050505;
+}
+
+#myVideo {
+    width: 100%;
+    height: 100%
+}
+
+.product-bg .item {
+    position: relative;
+    width: 100%;
+    height: 100%;
+}
+
+.product-bg .item .poster {
+    position: absolute;
+    top: 0;
+    left: 0;
+    height: 750rpx;
+    width: 100%;
+}
+
+.product-bg .item .poster .image {
+    width: 100%;
+    height: 100%;
+}
+
+.product-bg .item .stop {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    width: 136rpx;
+    height: 136rpx;
+    margin-top: -68rpx;
+    margin-left: -68rpx;
+}
+
+.product-bg .item .stop .image {
+    width: 100%;
+    height: 100%;
+}

+ 41 - 32
view/xcx/components/promotionGood/index.js

@@ -1,39 +1,48 @@
 var app = getApp();
+
 Component({
-  properties: {
-    benefit: {
-      type: Object,
-      value: [],
-    }
-  },
-  data: {
+    properties: {
+        benefit: {
+            type: Object,
+            value: [],
+        }
+    },
+
+    data: {
+
+    },
+
+    ready: function () {
 
-  },
-  ready: function () {
+    },
 
-  },
-  attached: function () {
+    attached: function () {
 
-  },
-  methods: {
-    /**
-   * 商品详情跳转
-   */
-  goDetail: function (e) {
-    let item = e.currentTarget.dataset.items
-    if (item.activity && item.activity.type === "1") {
-      wx.navigateTo({
-        url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
-      });
-    } else if (item.activity && item.activity.type === "2") {
-      wx.navigateTo({ url:  `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`});
-    } else if (item.activity && item.activity.type === "3") {
-      wx.navigateTo({
-        url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
-      });
-    } else {
-      wx.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
+    },
+    
+    methods: {
+        /**
+         * 商品详情跳转
+         */
+        goDetail: function (e) {
+            let item = e.currentTarget.dataset.items
+            if (item.activity && item.activity.type === "1") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
+                });
+            } else if (item.activity && item.activity.type === "2") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`
+                });
+            } else if (item.activity && item.activity.type === "3") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
+                });
+            } else {
+                wx.navigateTo({
+                    url: `/pages/goods_details/index?id=${item.id}`
+                });
+            }
+        }
     }
-  }
-  }
 })

+ 2 - 2
view/xcx/components/promotionGood/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 25 - 22
view/xcx/components/promotionGood/index.wxml

@@ -1,26 +1,29 @@
 <!-- 促销单品 -->
 <view class='promotionGood'>
-  <block wx:for="{{benefit}}" wx:key='index'>
-    <view class='item acea-row row-between-wrapper'  bindtap="goDetail" data-items='{{item}}'>
-      <view class='pictrue'>
-        <image src='{{item.image}}'></image>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
-        <text class="pictrue_log pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
-      </view>
+    <block wx:for="{{benefit}}" wx:key='index'>
+        <view class='item acea-row row-between-wrapper' bindtap="goDetail" data-items='{{item}}'>
+            <view class='pictrue'>
+                <image src='{{item.image}}'></image>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
+                <text class="pictrue_log pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
+            </view>
 
-      <view class='text'>
-        <view class='name line1'>{{item.store_name}}</view>
-        <view class='sp-money acea-row'>
-          <view class='moneyCon'>
-            促销价: ¥<text class='num'>{{item.price}}</text>
-          </view>
+            <view class='text'>
+                <view class='name line1'>{{item.store_name}}</view>
+                <view class='sp-money acea-row'>
+                    <view class='moneyCon'>
+                        促销价: ¥<text class='num'>{{item.price}}</text>
+                    </view>
+                </view>
+                <view class='acea-row row-between-wrapper'>
+                    <view class='money'>日常价:¥{{item.ot_price}}</view>
+                    <view>仅剩:{{item.stock}}{{item.unit_name}}</view>
+                </view>
+            </view>
         </view>
-        <view class='acea-row row-between-wrapper'>
-          <view class='money'>日常价:¥{{item.ot_price}}</view>
-          <view>仅剩:{{item.stock}}{{item.unit_name}}</view>
-        </view>
-      </view>
-    </view>
-  </block>
-</view>
+    </block>
+</view>

+ 55 - 10
view/xcx/components/promotionGood/index.wxss

@@ -1,11 +1,56 @@
 @import '/app.wxss';
-.promotionGood{padding:0 30rpx;}
-.promotionGood .item{border-bottom:1rpx solid #eee;height:250rpx;}
-.promotionGood .item .pictrue{width:188rpx;height:188rpx;position: relative;}
-.promotionGood .item .pictrue image{width:100%;height:100%;border-radius:6rpx;}
-.promotionGood .item .text{font-size:24rpx;color:#999;width:472rpx;}
-.promotionGood .item .text .name{font-size:30rpx;color:#333;}
-.promotionGood .item .text .sp-money{margin:34rpx 0 20rpx 0;}
-.promotionGood .item .text .sp-money .moneyCon{padding:0 18rpx;background-color:red;height:46rpx;line-height:46rpx;background-image:linear-gradient(to right,#ff6248 0%,#ff3e1e 100%);font-size:20rpx;color:#fff;border-radius:24rpx 3rpx 24rpx 3rpx;}
-.promotionGood .item .text .sp-money .moneyCon .num{font-size:24rpx;}
-.promotionGood .item .text .money{text-decoration:line-through;}
+
+.promotionGood {
+    padding: 0 30rpx;
+}
+
+.promotionGood .item {
+    border-bottom: 1rpx solid #eee;
+    height: 250rpx;
+}
+
+.promotionGood .item .pictrue {
+    width: 188rpx;
+    height: 188rpx;
+    position: relative;
+}
+
+.promotionGood .item .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 6rpx;
+}
+
+.promotionGood .item .text {
+    font-size: 24rpx;
+    color: #999;
+    width: 472rpx;
+}
+
+.promotionGood .item .text .name {
+    font-size: 30rpx;
+    color: #333;
+}
+
+.promotionGood .item .text .sp-money {
+    margin: 34rpx 0 20rpx 0;
+}
+
+.promotionGood .item .text .sp-money .moneyCon {
+    padding: 0 18rpx;
+    background-color: red;
+    height: 46rpx;
+    line-height: 46rpx;
+    background-image: linear-gradient(to right, #ff6248 0%, #ff3e1e 100%);
+    font-size: 20rpx;
+    color: #fff;
+    border-radius: 24rpx 3rpx 24rpx 3rpx;
+}
+
+.promotionGood .item .text .sp-money .moneyCon .num {
+    font-size: 24rpx;
+}
+
+.promotionGood .item .text .money {
+    text-decoration: line-through;
+}

+ 35 - 30
view/xcx/components/recommend/index.js

@@ -1,34 +1,39 @@
 var app = getApp();
 Component({
-  properties: {
-    host_product:{
-      type: Object,
-      value:[],
+    properties: {
+        host_product: {
+            type: Object,
+            value: [],
+        }
+    },
+
+    data: {},
+
+    attached: function () {},
+    
+    methods: {
+        /**
+         * 商品详情跳转
+         */
+        goDetail: function (e) {
+            let item = e.currentTarget.dataset.items
+            if (item.activity && item.activity.type === "1") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
+                });
+            } else if (item.activity && item.activity.type === "2") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`
+                });
+            } else if (item.activity && item.activity.type === "3") {
+                wx.navigateTo({
+                    url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
+                });
+            } else {
+                wx.navigateTo({
+                    url: `/pages/goods_details/index?id=${item.id}`
+                });
+            }
+        }
     }
-  },
-  data: {
-  },
-  attached: function () {
-  },
-  methods: {
-  /**
-   * 商品详情跳转
-   */
-   goDetail: function (e) {
-    let item = e.currentTarget.dataset.items
-    if (item.activity && item.activity.type === "1") {
-      wx.navigateTo({
-        url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
-      });
-    } else if (item.activity && item.activity.type === "2") {
-      wx.navigateTo({ url:  `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`});
-    } else if (item.activity && item.activity.type === "3") {
-      wx.navigateTo({
-        url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
-      });
-    } else {
-      wx.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
-    }
-   }
-  }
 })

+ 2 - 2
view/xcx/components/recommend/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 21 - 18
view/xcx/components/recommend/index.wxml

@@ -1,19 +1,22 @@
 <view class='recommend'>
-   <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 class='item' wx:for="{{host_product}}" wx:key='index' bindtap="goDetail" data-items='{{item}}'>
-         <view class='pictrue'>
-            <image src='{{item.image}}'></image>
-            <text class="pictrue_log_big pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
-            <text class="pictrue_log_big pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
-            <text class="pictrue_log_big pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
-         </view>
-         <view class='name line1'>{{item.store_name}}</view>
-         <view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
-      </view>
-   </view>
-</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 class='item' wx:for="{{host_product}}" wx:key='index' bindtap="goDetail" data-items='{{item}}'>
+            <view class='pictrue'>
+                <image src='{{item.image}}'></image>
+                <text class="pictrue_log_big pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
+                <text class="pictrue_log_big pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
+                <text class="pictrue_log_big pictrue_log_class"
+                    wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
+            </view>
+            <view class='name line1'>{{item.store_name}}</view>
+            <view class='money font-color'>¥<text class='num'>{{item.price}}</text></view>
+        </view>
+    </view>
+</view>

+ 59 - 12
view/xcx/components/recommend/index.wxss

@@ -1,13 +1,60 @@
 @import '/app.wxss';
-.recommend{background-color:#fff;}
-.recommend .title{height:135rpx;font-size:28rpx;color:#282828;}
-.recommend .title .name{margin:0 28rpx;}
-.recommend .title .iconfont{font-size:170rpx;color:#454545;}
-.recommend .title .iconfont.lefticon{transform:rotate(180deg);}
-.recommend .recommendList{padding:0 30rpx;}
-.recommend .recommendList .item{width:335rpx;margin-bottom:30rpx;}
-.recommend .recommendList .item .pictrue{width:100%;height:335rpx;position: relative;}
-.recommend .recommendList .item .pictrue image{width:100%;height:100%;border-radius:10rpx;}
-.recommend .recommendList .item .name{font-size:28rpx;color:#282828;margin-top:20rpx;}
-.recommend .recommendList .item .money{font-size:20rpx;margin-top:8rpx;}
-.recommend .recommendList .item .money .num{font-size:28rpx;}
+
+.recommend {
+    background-color: #fff;
+}
+
+.recommend .title {
+    height: 135rpx;
+    font-size: 28rpx;
+    color: #282828;
+}
+
+.recommend .title .name {
+    margin: 0 28rpx;
+}
+
+.recommend .title .iconfont {
+    font-size: 170rpx;
+    color: #454545;
+}
+
+.recommend .title .iconfont.lefticon {
+    transform: rotate(180deg);
+}
+
+.recommend .recommendList {
+    padding: 0 30rpx;
+}
+
+.recommend .recommendList .item {
+    width: 335rpx;
+    margin-bottom: 30rpx;
+}
+
+.recommend .recommendList .item .pictrue {
+    width: 100%;
+    height: 335rpx;
+    position: relative;
+}
+
+.recommend .recommendList .item .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 10rpx;
+}
+
+.recommend .recommendList .item .name {
+    font-size: 28rpx;
+    color: #282828;
+    margin-top: 20rpx;
+}
+
+.recommend .recommendList .item .money {
+    font-size: 20rpx;
+    margin-top: 8rpx;
+}
+
+.recommend .recommendList .item .money .num {
+    font-size: 28rpx;
+}

+ 25 - 22
view/xcx/components/share-red-packets/index.js

@@ -1,27 +1,30 @@
 var app = getApp();
-Component({
-  properties: {
-    sharePacket:{
-      type:Object,
-      value:{
-        isState: true,
-        priceName:'',
-      }
-    }
-  },
-  data: {
 
-  },
-  attached: function () {
-  },
-  methods: {
-    closeShare:function(){
-      this.setData({
-        "sharePacket.isState": true
-      })
+Component({
+    properties: {
+        sharePacket: {
+            type: Object,
+            value: {
+                isState: true,
+                priceName: '',
+            }
+        }
     },
-    goShare:function(){
-      this.triggerEvent('listenerActionSheet');
+
+    data: {
+
     },
-  }
+
+    attached: function () {},
+
+    methods: {
+        closeShare: function () {
+            this.setData({
+                "sharePacket.isState": true
+            })
+        },
+        goShare: function () {
+            this.triggerEvent('listenerActionSheet');
+        },
+    }
 })

+ 2 - 2
view/xcx/components/share-red-packets/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 12 - 12
view/xcx/components/share-red-packets/index.wxml

@@ -1,13 +1,13 @@
 <view class='sharing-packets {{sharePacket.isState==true?"on":""}}'>
-   <view class='iconfont icon-guanbi' bindtap='closeShare'></view>
-   <view class='line'></view>
-   <view class='sharing-con' bindtap='goShare'>
-      <image src='/images/red-packets.png'></image>
-      <view class='text font-color'>
-        <view>会员分享返</view>
-        <view class='money'><text class='label'>¥</text>{{sharePacket.priceName}}</view>
-        <view class='tip'>下单即返佣金</view>
-        <view class='shareBut'>立即分享</view>
-      </view>
-   </view>  
-</view>
+    <view class='iconfont icon-guanbi' bindtap='closeShare'></view>
+    <view class='line'></view>
+    <view class='sharing-con' bindtap='goShare'>
+        <image src='/images/red-packets.png'></image>
+        <view class='text font-color'>
+            <view>会员分享返</view>
+            <view class='money'><text class='label'>¥</text>{{sharePacket.priceName}}</view>
+            <view class='tip'>下单即返佣金</view>
+            <view class='shareBut'>立即分享</view>
+        </view>
+    </view>
+</view>

+ 79 - 11
view/xcx/components/share-red-packets/index.wxss

@@ -1,12 +1,80 @@
 @import '/app.wxss';
-.sharing-packets{position:fixed;left:30rpx;z-index:5;transition:all 0.3s ease-in-out 0s;opacity:1;transform: scale(1);bottom:150rpx;}
-.sharing-packets.on{transform: scale(0);opacity:0;}
-.sharing-packets .iconfont{width:44rpx;height:44rpx;border-radius:50%;text-align:center;line-height:44rpx;background-color:#999;font-size:20rpx;color:#fff;margin:0 auto;box-sizing:border-box;padding-left:1px;}
-.sharing-packets .line{width:2rpx;height:40rpx;background-color:#999;margin:0 auto;}
-.sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
-.sharing-packets .sharing-con image{width:100%;height:100%;}
-.sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
-.sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;}
-.sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
-.sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
-.sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}
+
+.sharing-packets {
+    position: fixed;
+    left: 30rpx;
+    z-index: 5;
+    transition: all 0.3s ease-in-out 0s;
+    opacity: 1;
+    transform: scale(1);
+    bottom: 150rpx;
+}
+
+.sharing-packets.on {
+    transform: scale(0);
+    opacity: 0;
+}
+
+.sharing-packets .iconfont {
+    width: 44rpx;
+    height: 44rpx;
+    border-radius: 50%;
+    text-align: center;
+    line-height: 44rpx;
+    background-color: #999;
+    font-size: 20rpx;
+    color: #fff;
+    margin: 0 auto;
+    box-sizing: border-box;
+    padding-left: 1px;
+}
+
+.sharing-packets .line {
+    width: 2rpx;
+    height: 40rpx;
+    background-color: #999;
+    margin: 0 auto;
+}
+
+.sharing-packets .sharing-con {
+    width: 187rpx;
+    height: 210rpx;
+    position: relative;
+}
+
+.sharing-packets .sharing-con image {
+    width: 100%;
+    height: 100%;
+}
+
+.sharing-packets .sharing-con .text {
+    position: absolute;
+    top: 30rpx;
+    font-size: 20rpx;
+    width: 100%;
+    text-align: center;
+}
+
+.sharing-packets .sharing-con .text .money {
+    font-size: 32rpx;
+    font-weight: bold;
+    margin-top: 5rpx;
+}
+
+.sharing-packets .sharing-con .text .money .label {
+    font-size: 20rpx;
+}
+
+.sharing-packets .sharing-con .text .tip {
+    font-size: 18rpx;
+    color: #999;
+    margin-top: 5rpx;
+}
+
+.sharing-packets .sharing-con .text .shareBut {
+    font-size: 22rpx;
+    color: #fff;
+    margin-top: 18rpx;
+    height: 50rpx;
+    line-height: 50rpx;
+}

+ 26 - 22
view/xcx/components/swipers/index.js

@@ -1,27 +1,31 @@
 // components/swiper/index.js
 var app = getApp();
+
 Component({
-  properties: {
-    imgUrls: {
-      type: Object,
-      value: []
-    }
-  },
-  data: {
-    circular: true,
-    autoplay: true,
-    interval: 3000,
-    duration: 500,
-    currentSwiper: 0
-  },
-  attached: function () {
-    console.log(this.data.imgUrls);
-  },
-  methods: {
-    swiperChange: function (e) {
-      this.setData({
-        currentSwiper: e.detail.current
-      })
+    properties: {
+        imgUrls: {
+            type: Object,
+            value: []
+        }
+    },
+
+    data: {
+        circular: true,
+        autoplay: true,
+        interval: 3000,
+        duration: 500,
+        currentSwiper: 0
     },
-  }
+
+    attached: function () {
+        console.log(this.data.imgUrls);
+    },
+    
+    methods: {
+        swiperChange: function (e) {
+            this.setData({
+                currentSwiper: e.detail.current
+            })
+        },
+    }
 })

+ 2 - 2
view/xcx/components/swipers/index.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+    "usingComponents": {},
+    "component": true
 }

+ 14 - 11
view/xcx/components/swipers/index.wxml

@@ -1,12 +1,15 @@
-    <view class='swiper'>
-        <swiper autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
-            <block wx:for="{{imgUrls}}" wx:key='index'>
-              <swiper-item>
-                <navigator url="{{item.link}}" style='width:100%;height:100%;' hover-class='none'><image src="{{item.img}}" class="slide-image"/></navigator>
-              </swiper-item>
-            </block>
-        </swiper>
-        <view class="dots acea-row">
-          <view class="dot {{index == currentSwiper ? 'active' : ''}}" wx:for="{{imgUrls}}" wx:key='index'></view>
-        </view>
+<view class='swiper'>
+    <swiper autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}"
+        bindchange="swiperChange">
+        <block wx:for="{{imgUrls}}" wx:key='index'>
+            <swiper-item>
+                <navigator url="{{item.link}}" style='width:100%;height:100%;' hover-class='none'>
+                    <image src="{{item.img}}" class="slide-image" />
+                </navigator>
+            </swiper-item>
+        </block>
+    </swiper>
+    <view class="dots acea-row">
+        <view class="dot {{index == currentSwiper ? 'active' : ''}}" wx:for="{{imgUrls}}" wx:key='index'></view>
     </view>
+</view>

+ 36 - 6
view/xcx/components/swipers/index.wxss

@@ -1,7 +1,37 @@
 @import '/app.wxss';
-.swiper{width:100%;height:282rpx;position:relative;}
-.swiper swiper{width:100%;height:100%;position:relative;}
-.swiper swiper .slide-image{width:100%;height:100%;}
-.swiper .dots{position:absolute;right:40rpx;bottom:20rpx;}
-.swiper .dots .dot{width:12rpx;height:12rpx;border:2rpx solid #fff;border-radius:50%;margin-right:15rpx;}
-.swiper .dots .dot.active{border-color:#e93323;background-color:#e93323;}
+
+.swiper {
+    width: 100%;
+    height: 282rpx;
+    position: relative;
+}
+
+.swiper swiper {
+    width: 100%;
+    height: 100%;
+    position: relative;
+}
+
+.swiper swiper .slide-image {
+    width: 100%;
+    height: 100%;
+}
+
+.swiper .dots {
+    position: absolute;
+    right: 40rpx;
+    bottom: 20rpx;
+}
+
+.swiper .dots .dot {
+    width: 12rpx;
+    height: 12rpx;
+    border: 2rpx solid #fff;
+    border-radius: 50%;
+    margin-right: 15rpx;
+}
+
+.swiper .dots .dot.active {
+    border-color: #e93323;
+    background-color: #e93323;
+}

+ 19 - 19
view/xcx/components/userEvaluation/index.js

@@ -1,24 +1,24 @@
 var app = getApp();
 Component({
-  properties: {
-    reply:{
-      type:Object,
-      value:[],
-    }
-  },
-  data: {
-    
-  },
-  attached: function () {
+    properties: {
+        reply: {
+            type: Object,
+            value: [],
+        }
+    },
+    data: {
 
-  },
-  methods: {
-    getpreviewImage:function(e){
-      var dataset=e.currentTarget.dataset;
-      wx.previewImage({ 
-        urls: this.data.reply[dataset.index].pics, 
-        current: this.data.reply[dataset.index].pics[dataset.pic_index],
-      });
     },
-  }
+    attached: function () {
+
+    },
+    methods: {
+        getpreviewImage: function (e) {
+            var dataset = e.currentTarget.dataset;
+            wx.previewImage({
+                urls: this.data.reply[dataset.index].pics,
+                current: this.data.reply[dataset.index].pics[dataset.pic_index],
+            });
+        },
+    }
 })

+ 1 - 1
view/xcx/components/userEvaluation/index.json

@@ -1,3 +1,3 @@
 {
-  "component": true
+    "component": true
 }

+ 22 - 23
view/xcx/components/userEvaluation/index.wxml

@@ -1,24 +1,23 @@
 <view class='evaluateWtapper'>
-   <view class='evaluateItem' wx:for="{{reply}}" wx:key='index'>
-      <view class='pic-text acea-row row-middle'>
-         <view class='pictrue'><image src='{{item.avatar}}'></image></view>
-         <view class='acea-row row-middle'>
-            <view class='name line1'>{{item.nickname}}</view>
-            <view class='start star{{item.star}}'></view>
-         </view>
-      </view>
-      <view class='time'>{{item.add_time}} {{item.suk}}</view>
-      <view class='evaluate-infor'>{{item.comment}}</view>
-      <view class='imgList acea-row'>
-          <view class='pictrue' wx:for="{{item.pics}}" wx:for-item="items" wx:for-index='pic_index' wx:key='index'>
-            <image  wx:if="{{items}}" src='{{items}}' data-index="{{index}}" data-pic_index='{{pic_index}}' bindtap='getpreviewImage'></image>
-          </view>
-      </view>
-      <view class='reply' wx:if='{{item.merchant_reply_content}}'><text class='font-color'>店小二</text>:{{item.merchant_reply_content}}</view>
-   </view> 
-</view>
-         
-           
-           
-           
-    
+    <view class='evaluateItem' wx:for="{{reply}}" wx:key='index'>
+        <view class='pic-text acea-row row-middle'>
+            <view class='pictrue'>
+                <image src='{{item.avatar}}'></image>
+            </view>
+            <view class='acea-row row-middle'>
+                <view class='name line1'>{{item.nickname}}</view>
+                <view class='start star{{item.star}}'></view>
+            </view>
+        </view>
+        <view class='time'>{{item.add_time}} {{item.suk}}</view>
+        <view class='evaluate-infor'>{{item.comment}}</view>
+        <view class='imgList acea-row'>
+            <view class='pictrue' wx:for="{{item.pics}}" wx:for-item="items" wx:for-index='pic_index' wx:key='index'>
+                <image wx:if="{{items}}" src='{{items}}' data-index="{{index}}" data-pic_index='{{pic_index}}'
+                    bindtap='getpreviewImage'></image>
+            </view>
+        </view>
+        <view class='reply' wx:if='{{item.merchant_reply_content}}'><text
+                class='font-color'>店小二</text>:{{item.merchant_reply_content}}</view>
+    </view>
+</view>

+ 84 - 13
view/xcx/components/userEvaluation/index.wxss

@@ -1,14 +1,85 @@
 @import '/app.wxss';
-.evaluateWtapper .evaluateItem{background-color:#fff;padding-bottom:25rpx;}
-.evaluateWtapper .evaluateItem~.evaluateItem{border-top:1rpx solid #f5f5f5;}
-.evaluateWtapper .evaluateItem .pic-text{font-size:26rpx;color:#282828;height:95rpx;padding:0 30rpx;}
-.evaluateWtapper .evaluateItem .pic-text .pictrue{width:56rpx;height:56rpx;margin-right:20rpx;}
-.evaluateWtapper .evaluateItem .pic-text .pictrue image{width:100%;height:100%;border-radius:50%;}
-.evaluateWtapper .evaluateItem .pic-text .name{max-width:450rpx;margin-right:15rpx;}
-.evaluateWtapper .evaluateItem .time{font-size:24rpx;color:#82848f;padding:0 30rpx;}
-.evaluateWtapper .evaluateItem .evaluate-infor{font-size:28rpx;color:#282828;margin-top:19rpx;padding:0 30rpx;}
-.evaluateWtapper .evaluateItem .imgList{padding:0 30rpx 0 15rpx;margin-top:25rpx;}
-.evaluateWtapper .evaluateItem .imgList .pictrue{width:156rpx;height:156rpx;margin:0 0 15rpx 15rpx;}
-.evaluateWtapper .evaluateItem .imgList .pictrue image{width:100%;height:100%;}
-.evaluateWtapper .evaluateItem .reply{font-size:26rpx;color:#454545;background-color:#f7f7f7;border-radius:5rpx;margin:20rpx 30rpx 0 30rpx;padding:30rpx;position:relative;}
-.evaluateWtapper .evaluateItem .reply::before{content: "";width: 0;height: 0;border-left:0.3rem solid transparent;border-right:0.3rem solid transparent;border-bottom:0.4rem solid #f7f7f7;position:absolute;top:-0.4rem;left:2rem;}
+
+.evaluateWtapper .evaluateItem {
+    background-color: #fff;
+    padding-bottom: 25rpx;
+}
+
+.evaluateWtapper .evaluateItem~.evaluateItem {
+    border-top: 1rpx solid #f5f5f5;
+}
+
+.evaluateWtapper .evaluateItem .pic-text {
+    font-size: 26rpx;
+    color: #282828;
+    height: 95rpx;
+    padding: 0 30rpx;
+}
+
+.evaluateWtapper .evaluateItem .pic-text .pictrue {
+    width: 56rpx;
+    height: 56rpx;
+    margin-right: 20rpx;
+}
+
+.evaluateWtapper .evaluateItem .pic-text .pictrue image {
+    width: 100%;
+    height: 100%;
+    border-radius: 50%;
+}
+
+.evaluateWtapper .evaluateItem .pic-text .name {
+    max-width: 450rpx;
+    margin-right: 15rpx;
+}
+
+.evaluateWtapper .evaluateItem .time {
+    font-size: 24rpx;
+    color: #82848f;
+    padding: 0 30rpx;
+}
+
+.evaluateWtapper .evaluateItem .evaluate-infor {
+    font-size: 28rpx;
+    color: #282828;
+    margin-top: 19rpx;
+    padding: 0 30rpx;
+}
+
+.evaluateWtapper .evaluateItem .imgList {
+    padding: 0 30rpx 0 15rpx;
+    margin-top: 25rpx;
+}
+
+.evaluateWtapper .evaluateItem .imgList .pictrue {
+    width: 156rpx;
+    height: 156rpx;
+    margin: 0 0 15rpx 15rpx;
+}
+
+.evaluateWtapper .evaluateItem .imgList .pictrue image {
+    width: 100%;
+    height: 100%;
+}
+
+.evaluateWtapper .evaluateItem .reply {
+    font-size: 26rpx;
+    color: #454545;
+    background-color: #f7f7f7;
+    border-radius: 5rpx;
+    margin: 20rpx 30rpx 0 30rpx;
+    padding: 30rpx;
+    position: relative;
+}
+
+.evaluateWtapper .evaluateItem .reply::before {
+    content: "";
+    width: 0;
+    height: 0;
+    border-left: 0.3rem solid transparent;
+    border-right: 0.3rem solid transparent;
+    border-bottom: 0.4rem solid #f7f7f7;
+    position: absolute;
+    top: -0.4rem;
+    left: 2rem;
+}

+ 14 - 14
view/xcx/components/write-off/index.js

@@ -1,20 +1,20 @@
 var app = getApp();
 Component({
-  properties: {
-    iShidden: {
-      type: Boolean,
-      value: false
-    }
-  },
-  data: {
+    properties: {
+        iShidden: {
+            type: Boolean,
+            value: false
+        }
+    },
+    data: {
 
-  },
-  attached: function () {
+    },
+    attached: function () {
 
-  },
-  methods: {
-    cancel: function () {
-      this.triggerEvent('cancel', false);
+    },
+    methods: {
+        cancel: function () {
+            this.triggerEvent('cancel', false);
+        }
     }
-  }
 })

+ 1 - 1
view/xcx/components/write-off/index.json

@@ -1,3 +1,3 @@
 {
-  "component": true
+    "component": true
 }

+ 11 - 9
view/xcx/components/write-off/index.wxml

@@ -1,12 +1,14 @@
- <view hidden="{{iShidden == false}}">
+<view hidden="{{iShidden == false}}">
     <view class="WriteOff">
-      <view class="pictrue"><image src="/images/value.jpg"></image></view>
-      <view class="num acea-row row-center-wrapper">wx156687208866123509
-        <view class="see">查看<text class="iconfont icon-xiangyou"></text></view>
-      </view>
-      <view class="tip">确定要核销此订单吗?</view>
-      <view class="sure">确定核销</view>
-      <view class="sure cancel" bindtap="cancel">取消</view>
+        <view class="pictrue">
+            <image src="/images/value.jpg"></image>
+        </view>
+        <view class="num acea-row row-center-wrapper">wx156687208866123509
+            <view class="see">查看<text class="iconfont icon-xiangyou"></text></view>
+        </view>
+        <view class="tip">确定要核销此订单吗?</view>
+        <view class="sure">确定核销</view>
+        <view class="sure cancel" bindtap="cancel">取消</view>
     </view>
     <view class="mask" catchtouchmove="true"></view>
- </view>
+</view>

+ 95 - 17
view/xcx/components/write-off/index.wxss

@@ -1,18 +1,96 @@
 @import '/app.wxss';
-.WriteOff {width: 560rpx;height: 800rpx;background-color: #fff;border-radius: 20rpx;
-  position: fixed;top: 50%;left: 50%;margin-top: -400rpx;margin-left: -280rpx;z-index: 99;
-  padding-top: 55rpx;}
-.WriteOff .pictrue {width: 340rpx;height: 340rpx;margin: 0 auto;}
-.WriteOff .pictrue image {width: 100%;height: 100%;display: block;border-radius: 10rpx;}
-.WriteOff .num {font-size: 30rpx;color: #666;margin: 28rpx 0 30rpx 0;}
-.WriteOff .num .see {font-size: 16rpx;color: #fff;border-radius: 4rpx;background-color: #c68937;padding-left: 5rpx;margin-left: 12rpx;}
-.WriteOff .num .see .iconfont {font-size: 15rpx;}
-.WriteOff .tip {font-size: 36rpx;color: #282828;text-align: center;border-top: 1px dashed #ccc;padding-top: 40rpx;position: relative;}
-.WriteOff .tip:after {content: "";position: absolute;width: 25rpx;height: 25rpx;
-border-radius: 50%;background-color: #7f7f7f;right: -12.5rpx;top: -12.5rpx;}
-.WriteOff .tip:before {content: "";position: absolute;width: 25rpx;height: 25rpx;
-  border-radius: 50%;background-color: #7f7f7f;left: -12.5rpx;top: -12.5rpx;}
-.WriteOff .sure {font-size: 32rpx;color: #fff;text-align: center;line-height: 82rpx;
-  height: 82rpx;width: 460rpx;border-radius: 41rpx;margin: 40rpx auto 0 auto;
-  background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);}
-.WriteOff .sure.cancel {background-image: none;color: #999;margin-top: 10rpx;}
+
+.WriteOff {
+    width: 560rpx;
+    height: 800rpx;
+    background-color: #fff;
+    border-radius: 20rpx;
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    margin-top: -400rpx;
+    margin-left: -280rpx;
+    z-index: 99;
+    padding-top: 55rpx;
+}
+
+.WriteOff .pictrue {
+    width: 340rpx;
+    height: 340rpx;
+    margin: 0 auto;
+}
+
+.WriteOff .pictrue image {
+    width: 100%;
+    height: 100%;
+    display: block;
+    border-radius: 10rpx;
+}
+
+.WriteOff .num {
+    font-size: 30rpx;
+    color: #666;
+    margin: 28rpx 0 30rpx 0;
+}
+
+.WriteOff .num .see {
+    font-size: 16rpx;
+    color: #fff;
+    border-radius: 4rpx;
+    background-color: #c68937;
+    padding-left: 5rpx;
+    margin-left: 12rpx;
+}
+
+.WriteOff .num .see .iconfont {
+    font-size: 15rpx;
+}
+
+.WriteOff .tip {
+    font-size: 36rpx;
+    color: #282828;
+    text-align: center;
+    border-top: 1px dashed #ccc;
+    padding-top: 40rpx;
+    position: relative;
+}
+
+.WriteOff .tip:after {
+    content: "";
+    position: absolute;
+    width: 25rpx;
+    height: 25rpx;
+    border-radius: 50%;
+    background-color: #7f7f7f;
+    right: -12.5rpx;
+    top: -12.5rpx;
+}
+
+.WriteOff .tip:before {
+    content: "";
+    position: absolute;
+    width: 25rpx;
+    height: 25rpx;
+    border-radius: 50%;
+    background-color: #7f7f7f;
+    left: -12.5rpx;
+    top: -12.5rpx;
+}
+
+.WriteOff .sure {
+    font-size: 32rpx;
+    color: #fff;
+    text-align: center;
+    line-height: 82rpx;
+    height: 82rpx;
+    width: 460rpx;
+    border-radius: 41rpx;
+    margin: 40rpx auto 0 auto;
+    background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
+}
+
+.WriteOff .sure.cancel {
+    background-image: none;
+    color: #999;
+    margin-top: 10rpx;
+}

+ 13 - 13
view/xcx/package.json

@@ -1,14 +1,14 @@
 {
-  "name": "twong",
-  "version": "1.0.0",
-  "description": "twong",
-  "main": "app.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "vant-weapp": "^0.5.23"
-  }
-}
+    "name": "twong",
+    "version": "1.0.0",
+    "description": "twong",
+    "main": "app.js",
+    "scripts": {
+        "test": "echo \"Error: no test specified\" && exit 1"
+    },
+    "author": "",
+    "license": "ISC",
+    "dependencies": {
+        "vant-weapp": "^0.5.23"
+    }
+}

+ 122 - 103
view/xcx/pages/activity/goods_bargain/index.js

@@ -1,108 +1,127 @@
 // pages/bargain-list/index.js
-import { getBargainList } from '../../../api/activity.js';
-import { openBargainSubscribe } from '../../../utils/SubscribeMessage.js';
+import {
+    getBargainList
+} from '../../../api/activity.js';
+import {
+    openBargainSubscribe
+} from '../../../utils/SubscribeMessage.js';
+
 const app = getApp();
+
 Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        bargainList: [],
+        page: 0,
+        limit: 20,
+        loading: false,
+        loadend: false,
+        userInfo: {},
+        navH: ''
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navH: app.globalData.navHeight
+        });
+    },
+
+    goBack: function () {
+        wx.navigateBack({
+            delta: 1
+        })
+    },
+
+    onLoadFun: function (e) {
+        this.getBargainList();
+        this.setData({
+            userInfo: e.detail
+        })
+    },
+
+    openSubscribe: function (e) {
+        let page = e.currentTarget.dataset.url;
+        wx.showLoading({
+            title: '正在加载',
+        })
+        openBargainSubscribe().then(res => {
+            wx.hideLoading();
+            wx.navigateTo({
+                url: page,
+            });
+        }).catch(() => {
+            wx.hideLoading();
+        });
+    },
+
+    getBargainList: function () {
+        var that = this;
+        if (that.data.loadend) return;
+        if (that.data.loading) return;
+        that.setData({
+            loading: true
+        });
+        getBargainList({
+            page: that.data.page,
+            limit: that.data.limit
+        }).then(function (res) {
+            that.setData({
+                bargainList: that.data.bargainList.concat(res.data),
+                page: that.data.page + 1,
+                loadend: that.data.limit > res.data.length,
+                loading: false
+            });
+        }).catch(res => {
+            that.setData({
+                loading: false
+            });
+        });
+    },
+    
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    bargainList:[],
-    page:0,
-    limit:20,
-    loading:false,
-    loadend:false,
-    userInfo:{},
-    navH:''
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.setData({
-      navH: app.globalData.navHeight
-    });
-  },
-  goBack:function(){
-    wx.navigateBack({ delta: 1 })
-  },
-  onLoadFun: function (e) {
-    this.getBargainList();
-    this.setData({
-      userInfo: e.detail
-    })
-  },
-  openSubscribe:function(e){
-    let page = e.currentTarget.dataset.url;
-    wx.showLoading({
-      title: '正在加载',
-    })
-    openBargainSubscribe().then(res => {
-      wx.hideLoading();
-      wx.navigateTo({
-        url: page,
-      });
-    }).catch(() => {
-      wx.hideLoading();
-    });
-  },
-  getBargainList:function(){
-    var that = this;
-    if (that.data.loadend) return;
-    if (that.data.loading) return;
-    that.setData({loading:true});
-    getBargainList({page:that.data.page,limit:that.data.limit}).then(function (res) {
-      that.setData({ 
-        bargainList: that.data.bargainList.concat(res.data),
-        page: that.data.page+1,
-        loadend: that.data.limit > res.data.length,
-        loading:false
-      });
-     }).catch(res=>{
-       that.setData({loading:false});
-     });
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-    this.getBargainList();
-  },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+        this.getBargainList();
+    },
 })

+ 5 - 5
view/xcx/pages/activity/goods_bargain/index.json

@@ -1,7 +1,7 @@
 {
-  "usingComponents": {
-    "home": "/components/home/index",
-    "authorize": "/components/authorize/authorize"
-  },
-  "navigationBarTextStyle": "white"
+    "usingComponents": {
+        "home": "/components/home/index",
+        "authorize": "/components/authorize/authorize"
+    },
+    "navigationBarTextStyle": "white"
 }

+ 19 - 16
view/xcx/pages/activity/goods_bargain/index.wxml

@@ -1,19 +1,22 @@
 <authorize bind:onLoadFun="onLoadFun"></authorize>
 <view class='bargain-list'>
-   <view class='iconfont icon-xiangzuo' bindtap='goBack' style='top:{{navH/2}}rpx'></view>
-   <view class='header'></view>
-   <view class='list'>
-      <block wx:for="{{bargainList}}" wx:key='index'>
-        <view data-url='/pages/activity/goods_bargain_details/index?id={{item.id}}&bargain={{userInfo.uid}}' class='item acea-row row-between-wrapper' hover-class='none' bindtap="openSubscribe">
-          <view class='pictrue'><image src='{{item.image}}'></image></view>
-          <view class='text acea-row row-column-around'>
-              <view class='line1'>{{item.title}}</view>
-              <view class='num'><text class='iconfont icon-pintuan'></text>{{item.people}}人正在参与</view>
-              <view class='money font-color'>最低: ¥<text class='price'>{{item.min_price}}</text></view>
-          </view>
-          <view class='cutBnt bg-color'><text class='iconfont icon-kanjia'></text>参与砍价</view>
-        </view>  
-      </block>      
-   </view>
+    <view class='iconfont icon-xiangzuo' bindtap='goBack' style='top:{{navH/2}}rpx'></view>
+    <view class='header'></view>
+    <view class='list'>
+        <block wx:for="{{bargainList}}" wx:key='index'>
+            <view data-url='/pages/activity/goods_bargain_details/index?id={{item.id}}&bargain={{userInfo.uid}}'
+                class='item acea-row row-between-wrapper' hover-class='none' bindtap="openSubscribe">
+                <view class='pictrue'>
+                    <image src='{{item.image}}'></image>
+                </view>
+                <view class='text acea-row row-column-around'>
+                    <view class='line1'>{{item.title}}</view>
+                    <view class='num'><text class='iconfont icon-pintuan'></text>{{item.people}}人正在参与</view>
+                    <view class='money font-color'>最低: ¥<text class='price'>{{item.min_price}}</text></view>
+                </view>
+                <view class='cutBnt bg-color'><text class='iconfont icon-kanjia'></text>参与砍价</view>
+            </view>
+        </block>
+    </view>
 </view>
-<!-- <home></home> -->
+<!-- <home></home> -->

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 2
view/xcx/pages/activity/goods_bargain/index.wxss


+ 364 - 281
view/xcx/pages/activity/goods_bargain_details/index.js

@@ -1,298 +1,381 @@
-import { 
-  getBargainDetail, 
-  postBargainStartUser,
-  postBargainStart, 
-  postBargainHelpPrice, 
-  postBargainHelpCount, 
-  postBargainHelp, 
-  postBargainHelpList, 
-  postBargainShare
+import {
+    getBargainDetail,
+    postBargainStartUser,
+    postBargainStart,
+    postBargainHelpPrice,
+    postBargainHelpCount,
+    postBargainHelp,
+    postBargainHelpList,
+    postBargainShare
 } from '../../../api/activity.js';
-import { postCartAdd } from '../../../api/store.js';
+import {
+    postCartAdd
+} from '../../../api/store.js';
 import wxh from '../../../utils/wxh.js';
 import WxParse from '../../../wxParse/wxParse.js';
 import util from '../../../utils/util.js';
+
 const app = getApp();
 
 Page({
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        countDownDay: '00',
+        countDownHour: '00',
+        countDownMinute: '00',
+        countDownSecond: '00',
+        active: false,
+        id: 0, //砍价产品编号
+        userInfo: {}, //当前用户信息
+        bargainUid: 0, //开启砍价用户
+        bargainUserInfo: {}, //开启砍价用户信息
+        bargainUserId: 0, //开启砍价编号
+        bargainInfo: [], //砍价产品
+        offset: 0,
+        limit: 20,
+        limitStatus: false,
+        bargainUserHelpList: [],
+        bargainUserHelpInfo: [],
+        bargainUserBargainPrice: 0,
+        status: '', // 0 开启砍价   1  朋友帮忙砍价  2 朋友帮忙砍价成功 3 完成砍价  4 砍价失败 5已创建订单
+        bargainCount: [], //分享人数  浏览人数 参与人数
+        retunTop: true,
+        bargainPartake: 0,
+        isHelp: false,
+        interval: null,
+        userBargainStatus: 0, //判断自己是否砍价
+        productStock: 0, //判断是否售罄;
+        quota: 0, //判断是否已限量;
+        userBargainStatusHelp: true,
+        navH: '',
+        statusPay: '',
+    },
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    countDownDay: '00',
-    countDownHour: '00',
-    countDownMinute: '00',
-    countDownSecond: '00',
-    active: false,
-    id:0,//砍价产品编号
-    userInfo:{},//当前用户信息
-    bargainUid: 0,//开启砍价用户
-    bargainUserInfo: {},//开启砍价用户信息
-    bargainUserId: 0,//开启砍价编号
-    bargainInfo:[],//砍价产品
-    offset:0,
-    limit:20,
-    limitStatus:false,
-    bargainUserHelpList:[],
-    bargainUserHelpInfo:[],
-    bargainUserBargainPrice:0,
-    status:'', // 0 开启砍价   1  朋友帮忙砍价  2 朋友帮忙砍价成功 3 完成砍价  4 砍价失败 5已创建订单
-    bargainCount:[],//分享人数  浏览人数 参与人数
-    retunTop:true,
-    bargainPartake:0,
-    isHelp:false,
-    interval:null,
-    userBargainStatus:0,//判断自己是否砍价
-    productStock:0,//判断是否售罄;
-    quota:0,//判断是否已限量;
-    userBargainStatusHelp:true,
-    navH: '',
-    statusPay:'',
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    this.setData({
-      navH: app.globalData.navHeight
-    });
-    var that = this;
-    var pages = getCurrentPages();
-    if (pages.length <= 1) that.setData({ retunTop:false});
-    //扫码携带参数处理
-    if (options.scene) {
-      var value = util.getUrlParams(decodeURIComponent(options.scene));
-      if (typeof value === 'object'){
-        if (value.id) options.id = value.id;
-        if (value.bargain) options.bargain = value.bargain;
-        //记录推广人uid
-        if (value.pid) app.globalData.spid = value.pid;
-      }else{
-        app.globalData.spid = value;
-      }
-    }
-    if (options.hasOwnProperty('id')) {
-      this.setData({ id: options.id, bargainUid: options.bargain || 0 });
-    }
-  },
-  /**
-   * 跳转到商品页面
-   */
-  goProduct:function(){
-    return app.Tips('/pages/goods_details/index?id=' + this.data.bargainInfo.product_id);
-  },
-  goBack: function () {
-    wx.navigateBack({ delta: 1 })
-  },
-  gobargainUserInfo:function(){//获取开启砍价用户信息
-    var that = this;
-    var data = { bargainId: that.data.id, bargainUserUid: that.data.bargainUid };
-    postBargainStartUser(data).then(res=>{
-      that.setData({ bargainUserInfo: res.data });
-    });
-  },
-  goPay: function () {//立即支付
-    var that = this;
-    var data = { 
-      productId: that.data.bargainInfo.product_id,
-      bargainId: that.data.id, 
-      cartNum: that.data.bargainInfo.num,
-      uniqueId:'',
-      combinationId:0,
-      secKillId:0,
-      'new':1
-    };
-    postCartAdd(data).then(res=>{
-      wx.navigateTo({ url: '/pages/order_confirm/index?cartId=' + res.data.cartId });
-    }).catch(err=>{
-      return app.Tips({title:err})
-    });
-  },
-  getBargainDetails:function(){//获取砍价产品详情
-    var that = this;
-    var id = that.data.id;
-    getBargainDetail(id).then(function(res){
-      that.setData({ 
-        bargainInfo: res.data.bargain, 
-        bargainPrice:res.data.bargain.price,
-        userInfo: res.data.userInfo, 
-        bargainSumCount: res.data.bargainSumCount,
-        userBargainStatus: res.data.userBargainStatus,
-        productStock: res.data.bargain.attr.product_stock,
-        quota: res.data.bargain.attr.quota
-      });
-      app.globalData.openPages = '/pages/activity/goods_bargain_details/index?id=' + that.data.id + '&bargain=' + that.data.bargainUid + '&scene=' + that.data.userInfo.uid;
-      WxParse.wxParse('description', 'html', that.data.bargainInfo.description || '', that, 0); 
-      WxParse.wxParse('rule', 'html', that.data.bargainInfo.rule || '', that, 0); 
-      wxh.time2(that.data.bargainInfo.stop_time, that);
-      that.getBargainHelpCount();
-      that.setData({ bargainUserHelpList: [] });
-      that.getBargainUser();
-      that.gobargainUserInfo();
-    }).catch(function(err){
-      return app.Tips({ title: err }, { tab: 3, url: 1 });
-    })
-  },
-  // 自己砍价;
-  userBargain:function(){
-    let that = this;
-    if (that.data.userInfo.uid == that.data.bargainUid){
-      that.setBargain();
-    }
-  },
-  getBargainHelpCount: function () {//获取砍价帮总人数、剩余金额、进度条、已经砍掉的价格
-    var that = this;
-    var data = { bargainId: that.data.id, bargainUserUid:that.data.bargainUid };
-    postBargainHelpCount(data).then(res=>{
-      var price = util.$h.Sub(that.data.bargainPrice, res.data.alreadyPrice);
-      that.setData({
-        bargainUserHelpInfo: res.data,
-        'bargainInfo.price': parseFloat(price) <= 0 ? 0 : price,
-        userBargainStatusHelp: res.data.userBargainStatus,
-        statusPay: res.data.status
-      });
-    })
-  },
-  currentBargainUser:function(){//当前用户砍价
-    this.setData({ bargainUid:this.data.userInfo.uid });
-    this.setBargain();
-  },
-  setBargain:function(){//参与砍价
-    var that = this;
-    postBargainStart(that.data.id).then(res=>{
-      that.setData({ bargainUserId: res.data });
-      that.getBargainUserBargainPrice();
-      that.setBargainHelp();
-      that.getBargainHelpCount();
-      that.setData({
-        userBargainStatus:1
-      })
-    })
-  },
-  setBargainHelp: function () {//帮好友砍价
-    var that = this;
-    var data = { bargainId: that.data.id, bargainUserUid: that.data.bargainUid };
-    postBargainHelp(data).then(res=>{
-      that.setData({ bargainUserHelpList: [],isHelp:true });
-      that.getBargainUser();
-      that.getBargainUserBargainPrice();
-      that.getBargainHelpCount();
-    }).catch(err=>{
-      that.setData({ bargainUserHelpList: [] }); 
-      that.getBargainUser();
-    })
-  },
-  getBargainUser: function () {//获取砍价帮
-    var that = this;
-    var data = { 
-      bargainId: that.data.id, 
-      bargainUserUid: that.data.bargainUid,
-      offset: that.data.offset,
-      limit: that.data.limit,
-    };
-    postBargainHelpList(data).then(res=>{
-      var bargainUserHelpListNew = [];
-      var bargainUserHelpList = that.data.bargainUserHelpList;
-      var len = res.data.length;
-      bargainUserHelpListNew = bargainUserHelpList.concat(res.data);
-      that.setData({ bargainUserHelpList: bargainUserHelpListNew, limitStatus: data.limit > len, offest: Number(data.offset) + Number(data.limit) });
-    });
-  },
-  getBargainUserBargainPricePoster:function(){
-    var that = this;
-    wx.navigateTo({
-      url: '/pages/activity/poster-poster/index?type=1&id=' + that.data.id,
-    });
-  },
-  getBargainUserBargainPrice: function () {//获取帮忙砍价砍掉多少金额
-    var that = this;
-    var data = {bargainId: that.data.id,bargainUserUid: that.data.bargainUid};
-    postBargainHelpPrice(data).then(res=>{
-      that.setData({ bargainUserBargainPrice: res.data, active: true });
-    }).catch(err=>{
-      that.setData({ active: false });
-    });
-  },
-  goBargainList:function(){
-     wx.navigateTo({
-       url: '/pages/activity/goods_bargain/index',
-     })
-  },
-  close:function(){
-    this.setData({
-      active: false
-    })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        this.setData({
+            navH: app.globalData.navHeight
+        });
+        var that = this;
+        var pages = getCurrentPages();
+        if (pages.length <= 1) that.setData({
+            retunTop: false
+        });
+        //扫码携带参数处理
+        if (options.scene) {
+            var value = util.getUrlParams(decodeURIComponent(options.scene));
+            if (typeof value === 'object') {
+                if (value.id) options.id = value.id;
+                if (value.bargain) options.bargain = value.bargain;
+                //记录推广人uid
+                if (value.pid) app.globalData.spid = value.pid;
+            } else {
+                app.globalData.spid = value;
+            }
+        }
+        if (options.hasOwnProperty('id')) {
+            this.setData({
+                id: options.id,
+                bargainUid: options.bargain || 0
+            });
+        }
+    },
 
-  },
-  onLoadFun: function (e) {
-    let uid = e.detail.uid;
-    if(!this.data.bargainUid && uid){
-      this.setData({bargainUid:uid});
-    }
-    if(!this.data.bargainUid){
-      return app.Tips({ title:'参数错误'},{tab:3,url:1})
-    }
-    this.getBargainDetails();
-    this.addShareBargain();
-    app.globalData.openPages = '/pages/activity/goods_bargain_details/index?id=' + this.data.id + '&bargain=' + this.data.bargainUid + '&spid=' + e.detail.uid;
-    this.setData({ bargainPartake: e.detail.uid});
-  },
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-  },
+    /**
+     * 跳转到商品页面
+     */
+    goProduct: function () {
+        return app.Tips('/pages/goods_details/index?id=' + this.data.bargainInfo.product_id);
+    },
+
+    goBack: function () {
+        wx.navigateBack({
+            delta: 1
+        })
+    },
+
+    gobargainUserInfo: function () { //获取开启砍价用户信息
+        var that = this;
+        var data = {
+            bargainId: that.data.id,
+            bargainUserUid: that.data.bargainUid
+        };
+        postBargainStartUser(data).then(res => {
+            that.setData({
+                bargainUserInfo: res.data
+            });
+        });
+    },
+
+    goPay: function () { //立即支付
+        var that = this;
+        var data = {
+            productId: that.data.bargainInfo.product_id,
+            bargainId: that.data.id,
+            cartNum: that.data.bargainInfo.num,
+            uniqueId: '',
+            combinationId: 0,
+            secKillId: 0,
+            'new': 1
+        };
+        postCartAdd(data).then(res => {
+            wx.navigateTo({
+                url: '/pages/order_confirm/index?cartId=' + res.data.cartId
+            });
+        }).catch(err => {
+            return app.Tips({
+                title: err
+            })
+        });
+    },
+
+    getBargainDetails: function () { //获取砍价产品详情
+        var that = this;
+        var id = that.data.id;
+        getBargainDetail(id).then(function (res) {
+            that.setData({
+                bargainInfo: res.data.bargain,
+                bargainPrice: res.data.bargain.price,
+                userInfo: res.data.userInfo,
+                bargainSumCount: res.data.bargainSumCount,
+                userBargainStatus: res.data.userBargainStatus,
+                productStock: res.data.bargain.attr.product_stock,
+                quota: res.data.bargain.attr.quota
+            });
+            app.globalData.openPages = '/pages/activity/goods_bargain_details/index?id=' + that.data.id + '&bargain=' + that.data.bargainUid + '&scene=' + that.data.userInfo.uid;
+            WxParse.wxParse('description', 'html', that.data.bargainInfo.description || '', that, 0);
+            WxParse.wxParse('rule', 'html', that.data.bargainInfo.rule || '', that, 0);
+            wxh.time2(that.data.bargainInfo.stop_time, that);
+            that.getBargainHelpCount();
+            that.setData({
+                bargainUserHelpList: []
+            });
+            that.getBargainUser();
+            that.gobargainUserInfo();
+        }).catch(function (err) {
+            return app.Tips({
+                title: err
+            }, {
+                tab: 3,
+                url: 1
+            });
+        })
+    },
+
+    // 自己砍价;
+    userBargain: function () {
+        let that = this;
+        if (that.data.userInfo.uid == that.data.bargainUid) {
+            that.setBargain();
+        }
+    },
+
+    getBargainHelpCount: function () { //获取砍价帮总人数、剩余金额、进度条、已经砍掉的价格
+        var that = this;
+        var data = {
+            bargainId: that.data.id,
+            bargainUserUid: that.data.bargainUid
+        };
+        postBargainHelpCount(data).then(res => {
+            var price = util.$h.Sub(that.data.bargainPrice, res.data.alreadyPrice);
+            that.setData({
+                bargainUserHelpInfo: res.data,
+                'bargainInfo.price': parseFloat(price) <= 0 ? 0 : price,
+                userBargainStatusHelp: res.data.userBargainStatus,
+                statusPay: res.data.status
+            });
+        })
+    },
+
+    currentBargainUser: function () { //当前用户砍价
+        this.setData({
+            bargainUid: this.data.userInfo.uid
+        });
+        this.setBargain();
+    },
+
+    setBargain: function () { //参与砍价
+        var that = this;
+        postBargainStart(that.data.id).then(res => {
+            that.setData({
+                bargainUserId: res.data
+            });
+            that.getBargainUserBargainPrice();
+            that.setBargainHelp();
+            that.getBargainHelpCount();
+            that.setData({
+                userBargainStatus: 1
+            })
+        })
+    },
+
+    setBargainHelp: function () { //帮好友砍价
+        var that = this;
+        var data = {
+            bargainId: that.data.id,
+            bargainUserUid: that.data.bargainUid
+        };
+        postBargainHelp(data).then(res => {
+            that.setData({
+                bargainUserHelpList: [],
+                isHelp: true
+            });
+            that.getBargainUser();
+            that.getBargainUserBargainPrice();
+            that.getBargainHelpCount();
+        }).catch(err => {
+            that.setData({
+                bargainUserHelpList: []
+            });
+            that.getBargainUser();
+        })
+    },
+
+    getBargainUser: function () { //获取砍价帮
+        var that = this;
+        var data = {
+            bargainId: that.data.id,
+            bargainUserUid: that.data.bargainUid,
+            offset: that.data.offset,
+            limit: that.data.limit,
+        };
+        postBargainHelpList(data).then(res => {
+            var bargainUserHelpListNew = [];
+            var bargainUserHelpList = that.data.bargainUserHelpList;
+            var len = res.data.length;
+            bargainUserHelpListNew = bargainUserHelpList.concat(res.data);
+            that.setData({
+                bargainUserHelpList: bargainUserHelpListNew,
+                limitStatus: data.limit > len,
+                offest: Number(data.offset) + Number(data.limit)
+            });
+        });
+    },
+
+    getBargainUserBargainPricePoster: function () {
+        var that = this;
+        wx.navigateTo({
+            url: '/pages/activity/poster-poster/index?type=1&id=' + that.data.id,
+        });
+    },
+
+    getBargainUserBargainPrice: function () { //获取帮忙砍价砍掉多少金额
+        var that = this;
+        var data = {
+            bargainId: that.data.id,
+            bargainUserUid: that.data.bargainUid
+        };
+        postBargainHelpPrice(data).then(res => {
+            that.setData({
+                bargainUserBargainPrice: res.data,
+                active: true
+            });
+        }).catch(err => {
+            that.setData({
+                active: false
+            });
+        });
+    },
+
+    goBargainList: function () {
+        wx.navigateTo({
+            url: '/pages/activity/goods_bargain/index',
+        })
+    },
+
+    close: function () {
+        this.setData({
+            active: false
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    onLoadFun: function (e) {
+        let uid = e.detail.uid;
+        if (!this.data.bargainUid && uid) {
+            this.setData({
+                bargainUid: uid
+            });
+        }
+        if (!this.data.bargainUid) {
+            return app.Tips({
+                title: '参数错误'
+            }, {
+                tab: 3,
+                url: 1
+            })
+        }
+        this.getBargainDetails();
+        this.addShareBargain();
+        app.globalData.openPages = '/pages/activity/goods_bargain_details/index?id=' + this.data.id + '&bargain=' + this.data.bargainUid + '&spid=' + e.detail.uid;
+        this.setData({
+            bargainPartake: e.detail.uid
+        });
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {},
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+        if (this.data.interval !== null) clearInterval(this.data.interval);
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+        if (this.data.interval !== null) clearInterval(this.data.interval);
+    },
 
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-    if (this.data.interval !== null) clearInterval(this.data.interval);
-  },
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-    if (this.data.interval !== null) clearInterval(this.data.interval);
-  },
+    },
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
 
-  },
+    },
 
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
+    addShareBargain: function () { //添加分享次数 获取人数
+        var that = this;
+        postBargainShare(this.data.id).then(res => {
+            that.setData({
+                bargainCount: res.data
+            })
+        });
+    },
 
-  },
-  addShareBargain: function () {//添加分享次数 获取人数
-    var that = this;
-    postBargainShare(this.data.id).then(res=>{
-      that.setData({ bargainCount: res.data })
-    });
-  },
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-    var that = this;
-    that.close();
-    that.addShareBargain();
-    return {
-      title: '您的好友' + that.data.userInfo.nickname + '邀请您帮他砍' + that.data.bargainInfo.title+' 快去帮忙吧!',
-      path: app.globalData.openPages,
-      imageUrl: that.data.bargainInfo.image,
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+        var that = this;
+        that.close();
+        that.addShareBargain();
+        return {
+            title: '您的好友' + that.data.userInfo.nickname + '邀请您帮他砍' + that.data.bargainInfo.title + ' 快去帮忙吧!',
+            path: app.globalData.openPages,
+            imageUrl: that.data.bargainInfo.image,
+        }
     }
-  }
 })

+ 5 - 5
view/xcx/pages/activity/goods_bargain_details/index.json

@@ -1,7 +1,7 @@
 {
-  "usingComponents": {
-    "home": "/components/home/index",
-    "authorize":"/components/authorize/authorize"
-  },
-  "navigationBarTextStyle": "white"
+    "usingComponents": {
+        "home": "/components/home/index",
+        "authorize": "/components/authorize/authorize"
+    },
+    "navigationBarTextStyle": "white"
 }

+ 129 - 109
view/xcx/pages/activity/goods_bargain_details/index.wxml

@@ -1,121 +1,141 @@
 <view class='bargain'>
-<view class='iconfont icon-xiangzuo' wx:if='{{retunTop}}' bindtap='goBack' style='top:{{navH/2}}rpx'></view>
+    <view class='iconfont icon-xiangzuo' wx:if='{{retunTop}}' bindtap='goBack' style='top:{{navH/2}}rpx'></view>
     <view class="header {{bargainUid != userInfo.uid ? 'on' : ''}}">
-    <view class='people' style="top:{{navH/2}}rpx">{{bargainCount.lookCount}}人查看 丨 {{bargainCount.shareCount}}人分享 丨 {{bargainCount.userCount}}人参与</view>
+        <view class='people' style="top:{{navH/2}}rpx">{{bargainCount.lookCount}}人查看 丨 {{bargainCount.shareCount}}人分享 丨
+            {{bargainCount.userCount}}人参与</view>
         <view class='time font-color' wx:if="{{bargainUid == userInfo.uid}}">
-          倒计时 <text>{{countDownDay}}</text> 天 
-          <text>{{countDownHour}}</text> 时 
-          <text>{{countDownMinute}}</text> 分 
-          <text>{{countDownSecond}}</text> 秒
-        </view> 
+            倒计时 <text>{{countDownDay}}</text> 天
+            <text>{{countDownHour}}</text> 时
+            <text>{{countDownMinute}}</text> 分
+            <text>{{countDownSecond}}</text> 秒
+        </view>
         <view wx:if="{{bargainUid != userInfo.uid }}" class='pictxt acea-row row-center-wrapper'>
-            <view class='pictrue'><image src='{{bargainUserInfo.avatar}}'></image></view>
+            <view class='pictrue'>
+                <image src='{{bargainUserInfo.avatar}}'></image>
+            </view>
             <view class='text'>{{bargainUserInfo.nickname}}<text>邀请您帮忙砍价</text></view>
         </view>
     </view>
-   <view class='wrapper'>
-      <view class='pictxt acea-row row-between-wrapper' bindtap="goProduct">
-         <view class='pictrue'>
-            <image src='{{bargainInfo.image}}'></image>
-            <view class="bargain_view">
-               查看商品
-               <text class="iconfont icon-jiantou iconfonts"></text>
+    <view class='wrapper'>
+        <view class='pictxt acea-row row-between-wrapper' bindtap="goProduct">
+            <view class='pictrue'>
+                <image src='{{bargainInfo.image}}'></image>
+                <view class="bargain_view">
+                    查看商品
+                    <text class="iconfont icon-jiantou iconfonts"></text>
+                </view>
             </view>
-         </view>
-         <view class='text acea-row row-column-around'>
-            <view class='line2'>{{bargainInfo.title}}</view>
-            <view class='money font-color'>当前: ¥<text class='num'>{{bargainInfo.price}}</text></view>
-            <view class='successNum'>已有{{bargainSumCount || 0}}人砍价成功</view>
-         </view>
-      </view>
-      <view class="cu-progress acea-row row-middle round margin-top">
-        <view class='acea-row row-middle bg-red' style="width:{{bargainUserHelpInfo.pricePercent}}%;"></view>
-      </view>
-      <view class='money acea-row row-between-wrapper'>
-         <view>已砍{{bargainUserHelpInfo.alreadyPrice}}元</view>
-         <view>还剩{{bargainUserHelpInfo.price}}元</view>
-      </view>
-      <!-- 自己砍价 -->
-      <view wx:if="{{bargainUid == userInfo.uid && !userBargainStatus && bargainUserHelpInfo.price > 0}}">
-	<view class='bargainBnt' bindtap='userBargain' wx:if="{{productStock>0&&quota>0}}">立即参与砍价</view>
-	<view class='bargainBnt grey' wx:if="{{productStock<=0||quota<=0}}">立即参与砍价</view>
-</view>
-<!-- 帮助砍价、帮砍成功:-->
-<view wx:if="{{bargainUid == userInfo.uid && bargainUserHelpInfo.price > 0 && userBargainStatus}}">
-	<view class='bargainBnt' bindtap='getBargainUserBargainPricePoster'>邀请好友帮砍价</view>
-</view>
-<view wx:if="{{bargainUid != userInfo.uid && userBargainStatusHelp}}">
-	<view class='bargainBnt' bindtap='setBargainHelp'>帮好友砍一刀</view>
-</view>
-<view wx:if="{{bargainUid != userInfo.uid && !userBargainStatusHelp}}">
-	<view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>
-	<view class='bargainBnt' bindtap='currentBargainUser'>我也要参与</view>
-</view>
-<view wx:if="{{bargainUserHelpInfo.price == 0 &&  bargainUid == userInfo.uid && statusPay!=3}}">
-	<view class='bargainBnt' bindtap='goPay'>立即支付</view>
-</view>
-      <view class='bargainBnt on' bindtap='goBargainList'>抢更多商品</view>
-      <view class='tip'>已有<text class='font-color'>{{bargainUserHelpInfo.count}}</text> 位好友成功砍价</view>
-      <view class='lock'></view>
-   </view>
-   <view class='bargainGang'>
-      <view class='title font-color acea-row row-center-wrapper'>
-         <view class='pictrue'><image src='/images/left.png'></image></view>
-         <view class='titleCon'>砍价帮</view>
-         <view class='pictrue on'><image src='/images/left.png'></image></view>
-      </view>
-      <view class='list'>
-        <block wx:for="{{bargainUserHelpList}}" wx:key='index'> 
-          <view class='item acea-row row-between-wrapper'>
-             <view class='pictxt acea-row row-between-wrapper'>
-                <view class='pictrue'><image src='{{item.avatar}}'></image></view>
-                <view class='text'>
-                   <view class='name line1'>{{item.nickname}}</view>
-                   <view class='line1'>{{item.add_time}}</view>
+            <view class='text acea-row row-column-around'>
+                <view class='line2'>{{bargainInfo.title}}</view>
+                <view class='money font-color'>当前: ¥<text class='num'>{{bargainInfo.price}}</text></view>
+                <view class='successNum'>已有{{bargainSumCount || 0}}人砍价成功</view>
+            </view>
+        </view>
+        <view class="cu-progress acea-row row-middle round margin-top">
+            <view class='acea-row row-middle bg-red' style="width:{{ bargainUserHelpInfo.pricePercent }}%;"></view>
+        </view>
+        <view class='money acea-row row-between-wrapper'>
+            <view>已砍{{bargainUserHelpInfo.alreadyPrice}}元</view>
+            <view>还剩{{bargainUserHelpInfo.price}}元</view>
+        </view>
+        <!-- 自己砍价 -->
+        <view wx:if="{{bargainUid == userInfo.uid && !userBargainStatus && bargainUserHelpInfo.price > 0}}">
+            <view class='bargainBnt' bindtap='userBargain' wx:if="{{productStock>0&&quota>0}}">立即参与砍价</view>
+            <view class='bargainBnt grey' wx:if="{{productStock<=0||quota<=0}}">立即参与砍价</view>
+        </view>
+        <!-- 帮助砍价、帮砍成功:-->
+        <view wx:if="{{bargainUid == userInfo.uid && bargainUserHelpInfo.price > 0 && userBargainStatus}}">
+            <view class='bargainBnt' bindtap='getBargainUserBargainPricePoster'>邀请好友帮砍价</view>
+        </view>
+        <view wx:if="{{bargainUid != userInfo.uid && userBargainStatusHelp}}">
+            <view class='bargainBnt' bindtap='setBargainHelp'>帮好友砍一刀</view>
+        </view>
+        <view wx:if="{{bargainUid != userInfo.uid && !userBargainStatusHelp}}">
+            <view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>
+            <view class='bargainBnt' bindtap='currentBargainUser'>我也要参与</view>
+        </view>
+        <view wx:if="{{bargainUserHelpInfo.price == 0 &&  bargainUid == userInfo.uid && statusPay!=3}}">
+            <view class='bargainBnt' bindtap='goPay'>立即支付</view>
+        </view>
+        <view class='bargainBnt on' bindtap='goBargainList'>抢更多商品</view>
+        <view class='tip'>已有<text class='font-color'>{{bargainUserHelpInfo.count}}</text> 位好友成功砍价</view>
+        <view class='lock'></view>
+    </view>
+    <view class='bargainGang'>
+        <view class='title font-color acea-row row-center-wrapper'>
+            <view class='pictrue'>
+                <image src='/images/left.png'></image>
+            </view>
+            <view class='titleCon'>砍价帮</view>
+            <view class='pictrue on'>
+                <image src='/images/left.png'></image>
+            </view>
+        </view>
+        <view class='list'>
+            <block wx:for="{{bargainUserHelpList}}" wx:key='index'>
+                <view class='item acea-row row-between-wrapper'>
+                    <view class='pictxt acea-row row-between-wrapper'>
+                        <view class='pictrue'>
+                            <image src='{{item.avatar}}'></image>
+                        </view>
+                        <view class='text'>
+                            <view class='name line1'>{{item.nickname}}</view>
+                            <view class='line1'>{{item.add_time}}</view>
+                        </view>
+                    </view>
+                    <view class='money font-color'><text class="iconfont icon-kanjia"></text>砍掉{{item.price}}元</view>
                 </view>
-             </view>
-             <view class='money font-color'><text class="iconfont icon-kanjia"></text>砍掉{{item.price}}元</view>
-          </view>
-        </block>  
-      </view>
-      <view class='load font-color' wx:if="{{!limitStatus}}" bindtap='getBargainUser'>点击加载更多</view>
-      <view class='lock'></view>
-   </view>
-   <view class='goodsDetails'>
-      <view class='title font-color acea-row row-center-wrapper'>
-         <view class='pictrue'><image src='/images/left.png'></image></view>
-         <view class='titleCon'>商品详情</view>
-         <view class='pictrue on'><image src='/images/left.png'></image></view>
-      </view>
-      <view class='conter'>
-          <template is="wxParse" data="{{wxParseData:description.nodes}}"/>
-      </view>
-      <view class='lock'></view>
-   </view>
-   <view class='goodsDetails'>
-      <view class='title font-color acea-row row-center-wrapper'>
-         <view class='pictrue'><image src='/images/left.png'></image></view>
-         <view class='titleCon'>砍价规则</view>
-         <view class='pictrue on'><image src='/images/left.png'></image></view>
-      </view>
-      <view class='conter'>
-          <template is="wxParse" data="{{wxParseData:rule.nodes}}"/>
-      </view>
-   </view>
-   <view class='bargainTip {{active==true?"on":""}}'>
-       <view class='pictrue'><image src='/images/bargainBg.jpg'></image></view>
-       <view wx:if="{{bargainUid == userInfo.uid }}">
-        <view class='cutOff'>您已砍掉<text class='font-color'>{{bargainUserBargainPrice.price}}</text>元,听说分享次数越多砍价成功的机会越大哦!</view>
-        <button open-type='share' class='tipBnt'>邀请好友帮砍价</button>
-       </view>
-       <view wx:else>
-        <view class='help font-color'>成功帮砍{{bargainUserBargainPrice.price}}元</view>
-        <view class='cutOff on'>您也可以砍价低价拿哦,快去挑选心仪的商品吧~</view>
-        <view bindtap='currentBargainUser' class='tipBnt'>我也要参与</view>
-       </view>
-   </view>
-   <view class='mask' catchtouchmove="true" hidden='{{active==false}}' bindtap='close'></view>
+            </block>
+        </view>
+        <view class='load font-color' wx:if="{{!limitStatus}}" bindtap='getBargainUser'>点击加载更多</view>
+        <view class='lock'></view>
+    </view>
+    <view class='goodsDetails'>
+        <view class='title font-color acea-row row-center-wrapper'>
+            <view class='pictrue'>
+                <image src='/images/left.png'></image>
+            </view>
+            <view class='titleCon'>商品详情</view>
+            <view class='pictrue on'>
+                <image src='/images/left.png'></image>
+            </view>
+        </view>
+        <view class='conter'>
+            <template is="wxParse" data="{{wxParseData:description.nodes}}" />
+        </view>
+        <view class='lock'></view>
+    </view>
+    <view class='goodsDetails'>
+        <view class='title font-color acea-row row-center-wrapper'>
+            <view class='pictrue'>
+                <image src='/images/left.png'></image>
+            </view>
+            <view class='titleCon'>砍价规则</view>
+            <view class='pictrue on'>
+                <image src='/images/left.png'></image>
+            </view>
+        </view>
+        <view class='conter'>
+            <template is="wxParse" data="{{wxParseData:rule.nodes}}" />
+        </view>
+    </view>
+    <view class='bargainTip {{active==true?"on":""}}'>
+        <view class='pictrue'>
+            <image src='/images/bargainBg.jpg'></image>
+        </view>
+        <view wx:if="{{bargainUid == userInfo.uid }}">
+            <view class='cutOff'>您已砍掉<text
+                    class='font-color'>{{bargainUserBargainPrice.price}}</text>元,听说分享次数越多砍价成功的机会越大哦!</view>
+            <button open-type='share' class='tipBnt'>邀请好友帮砍价</button>
+        </view>
+        <view wx:else>
+            <view class='help font-color'>成功帮砍{{bargainUserBargainPrice.price}}元</view>
+            <view class='cutOff on'>您也可以砍价低价拿哦,快去挑选心仪的商品吧~</view>
+            <view bindtap='currentBargainUser' class='tipBnt'>我也要参与</view>
+        </view>
+    </view>
+    <view class='mask' catchtouchmove="true" hidden='{{active==false}}' bindtap='close'></view>
 </view>
 <authorize bind:onLoadFun="onLoadFun"></authorize>
-<import src="/wxParse/wxParse.wxml"/>
+<import src="/wxParse/wxParse.wxml" />
 <!-- <home></home> -->

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 2
view/xcx/pages/activity/goods_bargain_details/index.wxss


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott