hwq 3 年 前
コミット
f3a0f6e81e
80 ファイル変更12435 行追加2202 行削除
  1. 10 5
      .hbuilderx/launch.json
  2. 51 0
      api/index.js
  3. 57 0
      api/login.js
  4. 146 0
      api/order.js
  5. 186 0
      api/product.js
  6. 71 0
      api/set.js
  7. 174 0
      api/user.js
  8. 102 0
      api/wallet.js
  9. 105 105
      manifest.json
  10. 350 120
      pages.json
  11. 1 1
      pages/category/category.vue
  12. 355 1169
      pages/index/index.vue
  13. 289 0
      pages/money/account.vue
  14. 416 0
      pages/money/pay.vue
  15. 376 0
      pages/money/pay1.vue
  16. 65 0
      pages/money/paySuccess.vue
  17. 396 0
      pages/money/recharge.vue
  18. 359 0
      pages/money/wallet.vue
  19. 312 0
      pages/money/withdrawal.vue
  20. 169 0
      pages/order/createOrder.vue
  21. 411 0
      pages/order/evaluate.vue
  22. 74 0
      pages/order/expressInfo.vue
  23. 677 0
      pages/order/order.vue
  24. 184 0
      pages/order/orderDetail.vue
  25. 246 0
      pages/order/orderRefund.vue
  26. 68 0
      pages/product/common/contentText.vue
  27. 139 0
      pages/product/common/discounts.vue
  28. 115 0
      pages/product/common/estimate.vue
  29. 85 0
      pages/product/common/freshDetail.vue
  30. 120 0
      pages/product/common/guessLike.vue
  31. 187 0
      pages/product/common/productBottom.vue
  32. 159 0
      pages/product/common/productContent.vue
  33. 98 0
      pages/product/common/topSwiper.vue
  34. 1156 0
      pages/product/product.vue
  35. 201 0
      pages/public/forget.vue
  36. 387 0
      pages/public/login.vue
  37. 282 0
      pages/public/register.vue
  38. 291 0
      pages/public/wxLogin.vue
  39. 208 0
      pages/set/address.vue
  40. 219 0
      pages/set/addressManage.vue
  41. 161 0
      pages/set/password.vue
  42. 161 0
      pages/set/phone.vue
  43. 113 0
      pages/set/set.vue
  44. 204 0
      pages/set/userinfo.vue
  45. 275 7
      pages/story/story.vue
  46. 126 0
      pages/story/storyDetail.vue
  47. 8 39
      pages/user/accounts.vue
  48. 235 0
      pages/user/extend.vue
  49. 192 0
      pages/user/integral.vue
  50. 358 0
      pages/user/jiedian.vue
  51. 72 0
      pages/user/refer.vue
  52. 162 0
      pages/user/shezhi.vue
  53. 8 2
      pages/user/submit.vue
  54. 389 175
      pages/user/user.vue
  55. 118 27
      pages/user/withdraw.vue
  56. BIN
      plugin/.git.rar
  57. 554 551
      static/css/cmy.css
  58. BIN
      static/icon/del.png
  59. BIN
      static/icon/jf.png
  60. BIN
      static/icon/share.png
  61. BIN
      static/image/background01.png
  62. BIN
      static/image/background02.png
  63. BIN
      static/image/background03.png
  64. BIN
      static/image/baodan.png
  65. BIN
      static/image/carousel.png
  66. BIN
      static/image/jiedian.png
  67. BIN
      static/image/jiedian1.png
  68. BIN
      static/image/jifen.png
  69. BIN
      static/image/jifen1.png
  70. BIN
      static/image/photo.jpg
  71. BIN
      static/image/sanchaji.png
  72. BIN
      static/image/search.png
  73. BIN
      static/img/img009.png
  74. BIN
      static/img/img010.png
  75. BIN
      static/img/img38.png
  76. BIN
      static/img/img39.png
  77. BIN
      static/img/jiedian.png
  78. BIN
      static/img/shareimg.png
  79. 1 1
      uni.scss
  80. 1 0
      utils/uni-copy.js

+ 10 - 5
.hbuilderx/launch.json

@@ -2,10 +2,15 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
-            "type": "uniCloud",
-            "default": {
-                "launchtype": "remote"
-            }
-        }
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
     ]
 }

+ 51 - 0
api/index.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 促销商品
+export function groom4(data) {
+	return request({
+		url: '/api/groom/list/4',
+		method: 'get',
+		data
+	});
+}
+// 精品推荐
+export function groom1(data) {
+	return request({
+		url: '/api/groom/list/1',
+		method: 'get',
+		data
+	});
+}
+// 新品首发
+export function groom3(data) {
+	return request({
+		url: '/api/groom/list/3',
+		method: 'get',
+		data
+	});
+}
+
+// 获取首页信息
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}
+//获取文章列表
+export function article(data,id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'get',
+		data
+	});
+}
+//获取文章详情
+export function details(data,id) {
+        return request({
+                url: '/api/article/details/'+id,
+                method: 'GET',
+                data
+        });
+}

+ 57 - 0
api/login.js

@@ -0,0 +1,57 @@
+import request from '@/utils/request'
+
+// 登录
+export function login(data) {
+	return request({
+		url: '/api/login',
+		method: 'post',
+		data
+	});
+}
+// 注册
+export function register(data) {
+	return request({
+		url: '/api/register',
+		method: 'post',
+		data
+	});
+}
+// 验证码
+export function verify(data) {
+	// type=register为注册
+	// type=login为登录
+	return request({
+		url: '/api/register/verify',
+		method: 'post',
+		data
+	});
+}
+
+// 获取用户信息
+export function getUserInfo(data) {
+	return request({
+		url: '/api/userinfo',
+		method: 'get',
+		data
+	});
+}
+
+// 短信登录
+export function loginMobile(data) {
+	return request({
+		url: '/api/login/mobile',
+		method: 'post',
+		data
+	});
+}
+// #ifdef APP-PLUS
+// 微信授权登录
+export function loginWx(data) {
+	return request({
+		url: '/api/wechat/appauth',
+		method: 'get',
+		data
+	});
+}
+// #endif
+

+ 146 - 0
api/order.js

@@ -0,0 +1,146 @@
+import request from '@/utils/request'
+import {upFilse} from '@/utils/request'
+// 订单确认
+export function confirm(data) {
+	return request({
+		url: '/api/order/confirm',
+		method: 'post',
+		data
+	});
+}
+//获取可使用优惠券
+export function couponsOrder(data,price) {
+	return request({
+		url: '/api/coupons/order/'+price,
+		method: 'get',
+		data
+	});
+}
+//获取优惠券列表
+export function getCouponsList(data,types) {
+	//优惠券状态 0全部 1未使用 2已使用
+	return request({
+		url: '/api/coupons/user/'+types,
+		method: 'get',
+		data
+	});
+}
+//提交评论
+export function order_comment(data) {
+	return request({
+		url: '/api/order/comment',
+		method: 'post',
+		data
+	});
+}
+//订单产品信息
+export function product(data) {
+	return request({
+		url: '/api/order/product',
+		method: 'post',
+		data
+	});
+}
+// 快递查询
+export function express_query(data) {
+	return request({
+		url: '/api/order/express_query',
+		method: 'get',
+		data
+	});
+}
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/upload/image',
+		method: 'post',
+		data
+	});
+}
+// 订单列表
+export function orderList(data) {
+	return request({
+		url: '/api/order/list',
+		method: 'get',
+		data
+	});
+}
+// 订单详细
+export function orderDetail(data,orderid) {
+	return request({
+		url: '/api/order/detail/'+orderid,
+		method: 'get',
+		data
+	});
+}
+
+// 取消订单
+export function orderCancel(data) {
+	return request({
+		url: '/api/order/cancel',
+		method: 'post',
+		data
+	});
+}
+
+// 删除订单
+export function orderDel(data) {
+	return request({
+		url: '/api/order/del',
+		method: 'get',
+		data
+	});
+}
+// 申请退款
+export function refund(data) {
+	return request({
+		url: '/api/order/refund/verify',
+		method: 'post',
+		data
+	});
+}
+// 退款理由列表
+export function refundReason(data) {
+	return request({
+		url: '/api/order/refund/reason',
+		method: 'get',
+		data
+	});
+}
+
+// 确认收货
+export function orderTake(data) {
+	return request({
+		url: '/api/order/take',
+		method: 'post',
+		data
+	});
+}
+
+// 订单支付
+export function orderPay(data) {
+	return request({
+		url: '/api/order/pay',
+		method: 'post',
+		data
+	});
+}
+
+// 创建订单
+export function createOrderkey(data,key) {
+	return request({
+		url: '/api/order/create/'+key,
+		method: 'post',
+		data
+	});
+}
+
+// 统计订单金额
+export function computedOrderkey(data) {
+	return request({
+		url: '/api/order/computed/'+data.orderkey,
+		method: 'post',
+		data
+	});
+}
+

+ 186 - 0
api/product.js

@@ -0,0 +1,186 @@
+import request from '@/utils/request'
+
+// 获取商品列表
+export function getProducts(data) {
+	// 	{
+	// 参数名称	是否必须	示例	备注
+	// sid			否			二级分类编号
+	// cid			否			一级分类编号(!)
+	// keyword		否			搜索
+	// priceOrder	否			价格排序
+	// salesOrder	否			销量排序
+	// news			否			是否新品
+	// page			否			分页参数起始值
+	// limit		否			分页数步长值
+	// }
+	return request({
+		url: '/api/products',
+		method: 'get',
+		data
+	});
+}
+// 获取商品详情
+export function goodsDetail(data, id) {
+	return request({
+		url: '/api/product/detail/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 砍价列表
+export function getBargainList(data) {
+	return request({
+		url: '/api/bargain/list',
+		method: 'get',
+		data
+	});
+}
+// 加入购物车
+export function cartAdd(data) {
+	return request({
+		url: '/api/cart/add',
+		method: 'post',
+		data
+	});
+}
+
+// 收藏商品
+export function collectAdd(data) {
+	return request({
+		url: '/api/collect/add',
+		method: 'post',
+		data
+	});
+}
+
+// 取消收藏商品
+export function collectDel(data) {
+	return request({
+		url: '/api/collect/del',
+		method: 'post',
+		data
+	});
+}
+
+// 获取搜搜关键字
+export function searchKeyword(data) {
+	return request({
+		url: '/api/search/keyword',
+		method: 'get',
+		data
+	});
+}
+
+// 获取热门分类信息
+export function groomList(data,type) {
+	// 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
+	return request({
+		url: '/api/groom/list/'+type,
+		method: 'get',
+		data
+	});
+}
+
+
+// 获取秒杀商品详细
+export function seckillGoods(data,id) {
+	return request({
+		url: '/api/seckill/detail/'+id,
+		method: 'get',
+		data
+	});
+}
+
+// 获取拼团商品详细
+export function groupGoods(data,id) {
+	return request({
+		url: '/api/combination/detail/'+id,
+		method: 'get',
+		data
+	});
+}
+
+
+// 获取商品分类
+export function getCategoryList(data) {
+	return request({
+		url: '/api/category',
+		method: 'get',
+		data
+	});
+}
+
+
+// 获取拼团列表
+export function getCombinationList(data) {
+	return request({
+		url: '/api/combination/list',
+		method: 'get',
+		data
+	});
+}
+
+//取消拼团
+export function getCombinationLisRemove(data,id) {
+	return request({
+		url: '/api/combination/remove'+id,
+		method: 'get',
+		data
+	});
+}
+
+//拼团开团页面数据
+export function getCombinationLisPink(data,id) {
+	return request({
+		url: '/api/combination/pink/'+id,
+		method: 'get',
+		data
+	});
+}
+
+// 获取拼团海报
+export function getCombinationPoster(data) {
+	return request({
+		url: '/api/combination/poster',
+		method: 'post',
+		data
+	});
+}
+
+
+// 获取秒杀分类
+export function getSeckillClass(data) {
+	return request({
+		url: '/api/seckill/index',
+		method: 'get',
+		data
+	});
+}
+// 获取秒杀列表
+export function getSeckillList(data,id) {
+	return request({
+		url: '/api/seckill/list/'+id,
+		method: 'get',
+		data
+	});
+}
+
+
+// 产品评价数量和好评度
+export function reply_config(data,id) {
+	return request({
+		url: '/api/reply/config/'+id,
+		method: 'get',
+		data
+	});
+}
+// 获取产品评论
+export function reply_list(data,id) {
+	return request({
+		url: '/api/reply/list/'+id,
+		method: 'get',
+		data
+	});
+}
+

+ 71 - 0
api/set.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 修改用户信息
+export function userEdit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}
+
+//退出登录
+export function logout(data) {
+	return request({
+		url: '/api/logout',
+		method: 'get',
+		data
+	});
+}
+//修改密码
+export function registerReset(data) {
+	return request({
+		url: '/api/register/reset',
+		method: 'post',
+		data
+	});
+}
+
+//绑定手机
+export function binding(data) {
+	return request({
+		url: '/api/binding',
+		method: 'post',
+		data
+	});
+}
+// #ifdef APP-PLUS
+//苹果生成账户
+export function applelogin(data) {
+	return request({
+		url: '/api/applelogin',
+		method: 'post',
+		data
+	});
+}
+// #endif
+
+
+//获取省市区
+export function getAddressArea(data) {
+	return request({
+		url: '/api/area',
+		method: 'get',
+		data
+	});
+}
+//获取村镇
+export function getAddressCity(data,id) {
+	return request({
+		url: '/api/village/'+id,
+		method: 'get',
+		data
+	});
+}
+export function getAddressDetail(data,id) {
+	return request({
+		url: '/api/address/detail/'+id,
+		method: 'get',
+		data
+	});
+}

+ 174 - 0
api/user.js

@@ -0,0 +1,174 @@
+import request from '@/utils/request'
+import { upFilse } from '@/utils/request';
+
+// 订单统计信息
+export function orderData(data) {
+	return request({
+		url: '/api/order/data',
+		method: 'get',
+		data
+	});
+}
+
+// 获取用户信息
+export function getUserInfo(data) {
+	return request({
+		url: '/api/user',
+		method: 'get',
+		data
+	});
+}
+
+// 用户分享图
+export function spreadBanner(data) {
+	return request({
+		url: '/api/spread/banner',
+		method: 'get',
+		data
+	});
+}
+
+// 获取地址列表
+export function getAddressList(data) {
+	return request({
+		url: '/api/address/list',
+		method: 'get',
+		data
+	});
+}
+// 修改地址
+export function addressEdit(data) {
+	return request({
+		url: '/api/address/edit',
+		method: 'post',
+		data
+	});
+}
+// 删除地址
+export function addressDel(data) {
+	return request({
+		url: '/api/address/del',
+		method: 'post',
+		data
+	});
+}
+// 设为默认地址
+export function setAddressDefault(data) {
+	return request({
+		url: '/api/address/default/set',
+		method: 'post',
+		data
+	});
+}
+// 购物车列表
+export function getCartList(data) {
+	return request({
+		url: '/api/cart/list',
+		method: 'get',
+		data
+	});
+}
+
+// 修改购物车数量
+export function getCartNum(data) {
+	return request({
+		url: '/api/cart/num',
+		method: 'post',
+		data
+	});
+}
+//删除购物车
+export function cartDel(data) {
+	return request({
+		url: '/api/cart/del',
+		method: 'post',
+		data
+	});
+}
+//获取收藏夹列表
+export function getcollectList(data) {
+	return request({
+		url: '/api/collect/user',
+		method: 'get',
+		data
+	});
+}
+// 取消收藏
+export function delcollect(data) {
+	return request({
+		url: '/api/collect/del',
+		method: 'post',
+		data
+	});
+}
+
+//上传图片
+export function upload(data){
+	return upFilse({
+		url:'/api/upload/image',
+		method:'post',
+		data
+	})
+}
+
+//用户修改信息
+export function edit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}
+
+// 推广的人数
+export function getSpreadPeople(data){
+	return request({
+		url:'/api/spread/people',
+		method:'post',
+		data
+	})
+}
+//我的会员
+export function getMyTvillage(data){
+	return request({
+		url:'/api/mytvillage',
+		method:'get',
+		data
+	})
+}
+
+//推广佣金/提现总和 
+//3=佣金,4=提现
+export function getSpreadCount(data,type) {
+	return request({
+		url:'/api/spread/count/'+type,
+		method:'get',
+		data
+	})
+}
+//我的实体店
+export function getMyStore(data) {
+	return request({
+		url:'/api/mystore',
+		method:'get',
+		data
+	})
+}
+
+//申请会员 店长
+export function enter(data) {
+	return request({
+		url:'/api/enter',
+		method:'post',
+		data
+	})
+}
+
+//编辑门店
+export function editStore(data) {
+	return request({
+		url:'/api/store_edit',
+		method:'post',
+		data
+	})
+}

+ 102 - 0
api/wallet.js

@@ -0,0 +1,102 @@
+import request from '@/utils/request'
+
+// 获取用户消费记录
+export function spreadCommission(data,state) {
+	return request({
+		url: '/api/spread/commission/'+state,
+		method: 'get',
+		data
+	});
+}
+
+// 获取账户余额
+export function userBalance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+// 提现
+export function extractCash(data) {
+	return request({
+		url: '/api/extract/cash',
+		method: 'post',
+		data
+	});
+}
+
+// 提现信息
+export function extractBank(data) {
+	return request({
+		url: '/api/extract/bank',
+		method: 'get',
+		data
+	});
+}
+// #ifdef H5
+// 公众号充值
+export function rechargeWechat(data) {
+	return request({
+		url: '/api/recharge/wechat',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// #ifdef MP
+// 小程序充值
+export function rechargeRoutine(data) {
+	return request({
+		url: '/api/recharge/routine',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// 获取提现支付宝账号
+export function aliInfo(data) {
+	return request({
+		url: '/api/ali/info',
+		method: 'get',
+		data
+	});
+}
+//获取默认银行卡账号
+export function bankInfo(data) {
+	return request({
+		url: '/api/bank/info',
+		method: 'get',
+		data
+	});
+}
+// 保存提现支付宝账号
+export function setAliInfo(data) {
+	return request({
+		url: '/api/ali/edit',
+		method: 'post',
+		data
+	});
+}
+//保存默认银行卡账号
+export function setBankInfo(data) {
+	return request({
+		url: '/api/bank/edit',
+		method: 'post',
+		data
+	});
+}
+
+
+// 账户余额
+export function balance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+
+

+ 105 - 105
manifest.json

@@ -1,105 +1,105 @@
-{
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    "app-plus" : {
-        /* 5+App特有相关 */
-        "usingComponents" : true,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        "modules" : {},
-        /* 模块配置 */
-        "distribute" : {
-            /* 应用发布信息 */
-            "android" : {
-                /* android打包配置 */
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
-            },
-            "ios" : {
-                "idfa" : false
-            },
-            /* ios打包配置 */
-            "sdkConfigs" : {
-                "maps" : {},
-                "oauth" : {
-                    "weixin" : {
-                        "appid" : "",
-                        "appsecret" : "",
-                        "UniversalLinks" : ""
-                    }
-                }
-            }
-        }
-    },
-    /* SDK配置 */
-    "quickapp" : {},
-    /* 快应用特有相关 */
-    "mp-weixin" : {
-        /* 小程序特有相关 */
-        "usingComponents" : true,
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : true
-        }
-    },
-    // "h5" : {
-    //     "title" : "商城",
-    //     "domain" : "",
-    //     "router" : {
-    //         "base" : "/index/",
-    //         "mode" : "hash"
-    //     },
-    //     "devServer" : {
-    //         "proxy" : {
-    //             "/api" : {
-    //                 "target" : "http://192.168.0.101/api",
-    //                 // "changeOrigin": true,
-    //                 "pathRewrite" : {
-    //                     "/api" : "" // rewrite path
-    //                 }
-    //             }
-    //         }
-    //     }
-    // }
-	"h5" : {
-	        "title" : "正一药业",
-	        "domain" : "",
-	        "router" : {
-	            "base" : "/index/",
-	            "mode" : "hash"
-	        },
-	        "devServer" : {
-	            "proxy" : {
-	                "/api" : {
-	                    "target" : "http://zccy.frp.liuniu946.com", //请求的目标域名
-	                    "changeOrigin" : true,
-	                    // "secure": false,
-	                    "pathRewrite" : {
-	                                                // "^/api": "/"
-	                                        }
-	                }
-	            }
-	        }
-	    }  
-}
+{
+    "name" : "基础项目",
+    "appid" : "__UNI__F0EBD91",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {},
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+            },
+            "ios" : {
+                "idfa" : false
+            },
+            /* ios打包配置 */
+            "sdkConfigs" : {
+                "maps" : {},
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "",
+                        "appsecret" : "",
+                        "UniversalLinks" : ""
+                    }
+                }
+            }
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "usingComponents" : true,
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : true
+        }
+    },
+    // "h5" : {
+    //     "title" : "商城",
+    //     "domain" : "",
+    //     "router" : {
+    //         "base" : "/index/",
+    //         "mode" : "hash"
+    //     },
+    //     "devServer" : {
+    //         "proxy" : {
+    //             "/api" : {
+    //                 "target" : "http://192.168.0.101/api",
+    //                 // "changeOrigin": true,
+    //                 "pathRewrite" : {
+    //                     "/api" : "" // rewrite path
+    //                 }
+    //             }
+    //         }
+    //     }
+    // }
+	"h5" : {
+	        "title" : "正一药业",
+	        "domain" : "",
+	        "router" : {
+	            "base" : "/index/",
+	            "mode" : "hash"
+	        },
+	        "devServer" : {
+	            "proxy" : {
+	                "/api" : {
+	                    "target" : "http://po.frp.liuniu946.com", //请求的目标域名
+	                    "changeOrigin" : true,
+	                    // "secure": false,
+	                    "pathRewrite" : {
+	                                                // "^/api": "/"
+	                                        }
+	                }
+	            }
+	        }
+	    }  
+}

+ 350 - 120
pages.json

@@ -1,143 +1,373 @@
-{
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"enablePullDownRefresh": true,
-				// #ifdef MP
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent",
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "请输入关键字",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "商城首页"
-			}
-		},
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "商品搜索",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "分类",
-				"navigationBarBackgroundColor":"#FFFFFF"
-			}
-		}, {
-			"path": "pages/cart/cart",
-			"style": {
-				"navigationBarTitleText": "购物车",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"navigationBarTextStyle":"black"
-			}
-		},
-		{
-			"path": "pages/user/user",
-			"style": {
-				"navigationStyle":"custom"
-			}
+{
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "商城首页"
+			}
 		},
 		{
-			"path": "pages/user/accounts",
+			"path": "pages/category/category",
 			"style": {
-				"navigationBarTitleText": "我的佣金",
-				"navigationBarBackgroundColor":"#F1F1F1",
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
+				"app-plus": {
+					"bounce": "none",
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "商品搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
+						}
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "分类",
+				"navigationBarBackgroundColor": "#FFFFFF"
+			}
+		},
+		{
+			"path": "pages/product/product",
+			"style": {
+				"navigationBarTitleText": "详情展示",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/cart/cart",
+			"style": {
+				"navigationBarTitleText": "购物车",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/user",
+			"style": {
+				"navigationBarTitleText": "个人中心",
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/user/accounts",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的佣金"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/integral",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的积分"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/extend",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的推广"
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/user/transfer",
 			"style": {
 				"navigationBarTitleText": "佣金转账",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"navigationBarTextStyle":"black"	
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
 			}
 		},
 		{
 			"path": "pages/user/submit",
 			"style": {
 				"navigationBarTitleText": "提交成功",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"navigationBarTextStyle":"black"
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/jiedian",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的接点"
+					}
+				}
 			}
 		},
 		{
 			"path": "pages/user/withdraw",
 			"style": {
 				"navigationBarTitleText": "提现",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"navigationBarTextStyle":"black"
-			}
-		},
-		{
-			"path": "pages/story/story",
-			"style": {
-				"navigationBarTitleText": "品牌中心",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"navigationBarTextStyle":"black"
-			}
-		}
-	],
-	"tabBar": {
-		"color": "#C0C4CC",
-		"selectedColor": "#5DBC7C",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index/index",
-				"iconPath": "static/tabBar/tab-home.png",
-				"selectedIconPath": "static/tabBar/tab-home-current.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/category/category",
-				"iconPath": "static/tabBar/tab-cate.png",
-				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "分类"
-			},
-			{
-				"pagePath": "pages/story/story",
-				"iconPath": "static/tabBar/tab-cart.png",
-				"selectedIconPath": "static/tabBar/tab-cart-current.png",
-				"text": "品牌故事"
-			},
-			{
-				"pagePath": "pages/cart/cart",
-				"iconPath": "static/tabBar/tab-cart.png",
-				"selectedIconPath": "static/tabBar/tab-cart-current.png",
-				"text": "购物车"
-			},
-			{
-				"pagePath": "pages/user/user",
-				"iconPath": "static/tabBar/tab-my.png",
-				"selectedIconPath": "static/tabBar/tab-my-current.png",
-				"text": "我的"
-			}
-		]
-	}
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/user/refer",
+			"style": {
+				"navigationBarTitleText": "提交申请",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/user/shezhi",
+			"style": {
+				"navigationBarTitleText": "设置",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/story/story",
+			"style": {
+				"navigationBarTitleText": "品牌故事",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTextStyle": "black"
+
+			}
+		},
+		{
+			"path": "pages/story/storyDetail",
+			"style": {
+				// "navigationBarTitleText": "品牌故事",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/order/order",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的订单"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/order/expressInfo",
+			"style": {
+				"navigationBarTitleText": "快递详情"
+			}
+		},
+		{
+			"path": "pages/order/orderDetail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "pages/order/evaluate",
+			"style": {
+				"navigationBarTitleText": "评论"
+			}
+		},
+		{
+			"path": "pages/order/orderRefund",
+			"style": {
+				"navigationBarTitleText": "申请退款"
+			}
+		},
+		{
+			"path": "pages/order/createOrder",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		},
+		{
+			"path": "pages/set/address",
+			"style": {
+				"navigationBarTitleText": "收货地址"
+			}
+		},
+		{
+			"path": "pages/set/addressManage",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/set/phone",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
+		},
+		{
+			"path": "pages/set/password",
+			"style": {
+				"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "pages/set/userinfo",
+			"style": {
+				"navigationBarTitleText": "修改资料"
+			}
+		},
+		{
+			"path": "pages/money/pay",
+			"style": {
+				"navigationBarTitleText": "支付"
+			}
+		},
+		{
+			"path": "pages/money/paySuccess",
+			"style": {
+				"navigationBarTitleText": "支付成功"
+			}
+		},
+		{
+			"path": "pages/money/wallet",
+			"style": {
+				"navigationBarTextStyle": "black",
+				"navigationBarBackgroundColor": "transparent",
+				"app-plus": {
+					"titleNView": {
+						"type": "float",
+						"titleText": "我的钱包"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/money/account",
+			"style": {
+				"navigationBarTitleText": "提现账号"
+			}
+		},
+		{
+			"path": "pages/money/withdrawal",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/money/recharge",
+			"style": {
+				"navigationBarTitleText": "充值"
+			}
+		},
+		{
+			"path": "pages/public/register",
+			"style": {
+				"navigationBarTitleText": "注册",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}, {
+			"path": "pages/public/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/wxLogin",
+			"style": {
+				"navigationBarTitleText": "微信登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/forget",
+			"style": {
+				"navigationBarTitleText": "忘记密码",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}
+	],
+	"tabBar": {
+		"color": "#C0C4CC",
+		"selectedColor": "#3F7C1F",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/category/category",
+				"iconPath": "static/tabBar/tab-cate.png",
+				"selectedIconPath": "static/tabBar/tab-cate-current.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/story/story",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "品牌故事"
+			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
+			},
+			{
+				"pagePath": "pages/user/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
+			}
+		]
+	}
 }

+ 1 - 1
pages/category/category.vue

@@ -18,7 +18,7 @@
 </template>
 
 <script>
-// import { getCategoryList } from '@/api/product.js';
+import { getCategoryList } from '@/api/product.js';
 export default {
 	data() {
 		return {

+ 355 - 1169
pages/index/index.vue

@@ -1,1256 +1,442 @@
 <template>
 	<view class="container">
-		<!-- 小程序头部兼容 -->
-		<!-- #ifdef MP -->
-		<view class="input-box flex" @click="clickSearch">
-			<view class=" input-content flex">
-				<view class="iconfont iconsearch"></view>
-				<view class="input"><input type="text" disabled placeholder="搜索关键字"></view>
+		<view class="searchbackground">
+			<view class="backgroundimg">
+				<image src="../../static/image/background01.png" mode=""></image>
 			</view>
 		</view>
-		<view class="mp-height"></view>
-			<!-- #endif -->
-			<!-- 背景色区域 -->
-			<view class="bg-contain">
-				<image src="./contain.png" mode="scaleToFill">
-				</image>
-				<!-- 头部轮播 -->
-					<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
-						<swiper-item v-for="(item,index) in carouselList" class="carousel-item" @click="bannerNavToUrl(item)">
-							<image src="./lunbo.png" mode="scaleToFill"></image>
-						</swiper-item>
-					</swiper>
-			</view>
-				<!-- 自定义swiper指示器 -->
-				<!-- <view class="swiper-dots">
-					<text class="num">{{ swiperCurrent + 1 }}</text>
-					<text class="sign">/</text>
-					<text class="num">{{ swiperLength }}</text>
-				</view> -->
-		<!-- 分类 -->
-		<view class="cate-section">
-			<view class="cate-item">
-				<image src="/static/icon/c3.png"></image>
-				<text>联盟礼包</text>
-			</view>
-			<navigator url="/pages/product/groupBooking/index">
-				<view class="cate-item">
-					<image src="/static/icon/c5.png"></image>
-					<text>超值拼团</text>
+		<view class="content flex">
+			<view class="input-box flex" @click="clickSearch">
+				<view class=" input-content flex">
+					<view class="iconfont iconsearch"></view>
+					<view class="input"><input type="text" disabled placeholder="请输入搜索内容" /></view>
 				</view>
-			</navigator>
-			<navigator url="/pages/product/seckill">
-				<view class="cate-item">
-					<image src="/static/icon/c7.png"></image>
-					<text>限时秒杀</text>
+			</view>
+			<swiper class="carousel" autoplay="true" :interval="5000" :duration="400">
+				<swiper-item @click="carouselList" class="carousel-item" v-for="(item,index) in carouselList"
+					:key="index">
+					<image :src="item.pic"></image>
+				</swiper-item <!-- 自定义swiper指示器 -->
+				<view class="swiper-dots">
 				</view>
-			</navigator>
-			<navigator url="/pages/index/sign">
-				<view class="cate-item">
-					<image src="/static/icon/c8.png"></image>
-					<text>每日签到</text>
+			</swiper>
+			<view class="customs">
+				<image src="../../static/image/baodan.png" mode=""></image>
+			</view>
+			<view class="customs-content">
+				<view class="backgroundimg1">
+					<image src="../../static/image/background02.png" mode=""></image>
 				</view>
-			</navigator>
-		</view>
-		
-		<view class="ad-1"><image src="/static/temp/ad1.jpg" mode="scaleToFill"></image></view>
-		<!-- 可领取优惠券 -->
-		<!-- <scroll-view class="coupon-box clamp" :scroll-x="true">
-			<view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
-				<view class="row flex">
-					<view class="list-money flex">
-						<image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
-						<view class="list-money-text">
-							<view class="tit" :class="{ noAction: item.is_use }">
-								<text>{{ item.coupon_price }}</text>
-							</view>
-						</view>
+				<view class="box">
+					<view class="customs-img">
+						<image src="../../static/img/reduce.png" mode=""></image>
 					</view>
-					<view class="list-interval position-relative">
-						<view class="bottom"></view>
-						<view class="top"></view>
-					</view>
-					<view class="row_list_right">
-						<view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
-						<view class="right_time">
-							<text>满{{ item.use_min_price }}使用</text>
-						</view>
-					</view>
-					<view class="right_use" :class="{ noAction: item.is_use }" @click="setCoupons(item)">
-						<text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
-					</view>
-				</view>
-			</view>
-		</scroll-view> -->
-
-		<!-- 秒杀楼层 -->
-		<seckill></seckill>
-		<!-- 砍价 -->
-		<view class="hot-goods">
-			<view class="hot-headers flex-upDown-center">
-				<!-- <image class="img" src="../../static/img/img44.png"></image> -->
-				<view class="hot-title">超值砍价</view>
-				<view><view class="more" @click.stop="navTo('/pages/activity/goods_bargain/index')">更多</view></view>
-			</view>
-			<view class="hot-lists" v-for="(baritem, barindex) in bargainlist" :key="barindex" @click.stop="navToDetailPages(baritem)">
-				<view class="hot-produce">
-					<view class="produce-image"><image :src="baritem.image"></image></view>
-					<view class="produce-content">
-						<view class="produce-price1 ">
-							<view class="produce-name line2">{{ baritem.title }}</view>
-							<!-- <view class="produce-info">
-								已抢
-								<text style="color: #FF383E">{{ baritem.sales }}</text>
-								箱/仅剩
-								<text style="color:#FF383E">{{ baritem.stock }}</text>
-								箱
-							</view> -->
-							<view class="produce-center">
-								<view class="kanjia_word">
-									<view class="word-1">原价:¥{{ baritem.price }}</view>
-									<view class="word-2">
-										砍后价
-										<text style="font-size: 24rpx;">¥</text>
-										<text style="font-size: 36rpx;">{{ baritem.min_price }}</text>
-									</view>
-								</view>
-								<view
-									class="kanjia_button flex-center"
-									@tap.stop="openSubscribe('/pages/activity/goods_bargain_details/index?id=' + baritem.id + '&bargain=' + userInfo.uid)"
-								>
-									<view>查看详情</view>
-								</view>
+					<view class="customstext">
+						<view class="customstext1">
+							<view class="customstext-title">
+								竹胎酵素健康饮
+							</view>
+							<view class="customstext-product">
+								健康生态饮品纯植物无香精
 							</view>
 						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 拼团楼层 -->
-
-		<view class="recommend flex">
-			<view class="recommend_list" @click="change(ls.id)" v-for="ls in recommend">
-				<view class="re_title" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_title }}</view>
-				<view class="re_name" v-bind:class="{ active_color: ls.id == checkid }">{{ ls.re_name }}</view>
-				<image class="selected_icon" v-bind:class="{ active: ls.id == checkid }" src="/static/img/img04.png"></image>
-			</view>
-		</view>
-		<swiper id="list-box" @change="listChange" :style="{ height: swiperHeight + 'px' }" :current="checkid">
-			<swiper-item>
-				<!-- <scroll-view scroll-y="true" class="list-box-h"> -->
-				<view class="guess-section">
-					<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-						<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-						<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-						<view class="cmy-hr"></view>
-						<view class="price margin-c-20 flex">
-							<view>
-								<text class="font-size-sm ">¥</text>
-								{{ item.price }}
+						<view class="customsprice">
+							<view class="customsprice-left">
+								健康价:¥
 							</view>
-							<view class="font-size-sm">
-								<text class="font-color-gray">{{ item.sales }}人购买</text>
+							<view class="customsprice-between">
+								199
 							</view>
-						</view>
-					</view>
-				</view>
-				<!-- </scroll-view> -->
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true" class="list-box-h">
-					<view class="guess-section">
-						<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-							<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-							<view class="cmy-hr"></view>
-							<view class="price margin-c-20 flex">
-								<view>
-									<text class="font-size-sm ">¥</text>
-									{{ item.price }}
-								</view>
-								<view class="font-size-sm">
-									<text class="font-color-gray">{{ item.sales }}人购买</text>
-								</view>
+							<view class="customsprice-right">
+								立即复购
 							</view>
 						</view>
 					</view>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true">
-					<view class="guess-section">
-						<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-							<navigator :url="item.link">
-								<view class="image-wrappe r"><image :src="item.image" mode="scaleToFill"></image></view>
-								<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-								<view class="cmy-hr"></view>
-								<view class="price margin-c-20 flex">
-									<view>
-										<text class="font-size-sm ">¥</text>
-										{{ item.price }}
-									</view>
-									<view class="font-size-sm">
-										<text class="font-color-gray">库存{{ item.stock + item.unit_name }}</text>
-									</view>
-								</view>
-							</navigator>
-						</view>
-					</view>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-
-		<!-- 精品 商品 -->
-		<view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
 				</view>
+				
 			</view>
-		</view>
-		<!-- 最新 商品 -->
-		<view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">最新商品</text></view>
-			<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 促销 商品 -->
-		<view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">促销商品</text></view>
-			<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 会员升级专区 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">会员升级专区</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="uservip flex">
-			<image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
-			<view class="detail">
-				<view class="title">满园春1999元会员升级礼包</view>
-				<view class="icon">自营</view>
-				<view class="flex price-box">
-					<view class="price">
-						<text class="font-size-sm">¥</text>
-						18888
-					</view>
-					<view class="text">115人购买</view>
-				</view>
+			
+			<view class="customs">
+				<image src="../../static/image/jifen.png" mode=""></image>
 			</view>
-		</view> -->
-
-		<!-- 精品推荐 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp margin-c-20">
-					<text class="icon">自营</text>
-					{{ item.title }}
-				</text>
-				<view class="hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
+			<view class="jifen-content">
+				
+				
+				
+				<view class="jifen-box">
+					<view class="img">
+						<image src="../../static/image/jifen1.png" mode=""></image>
 					</view>
-					<view class="font-size-sm">
-						<view class='detail'>
-							<text class="icon">代理价</text>
-							<text></text>
+					<view class="jifen-list">
+						<view class="box-title">
+							<view class="top">
+								竹胎酵素健康饮
+							</view>
+							<view class="button">
+								健康生态饮品纯植物
+							</view>
 						</view>
-						<view class="detail">
-							<text class="font-color-yellow">会员价</text>
-							<text class="font-color-yellow">7.5折</text>
+						<view class="box-price">
+							<view class="pricebox">
+								<image src="../../static/image/search.png" mode=""></image>
+							</view>
+							<view class="price-left">
+								2690
+							</view>
+							<view class="price-right">
+								¥360
+							</view>
 						</view>
 					</view>
 				</view>
-				<view class="tip">兑换价¥44+44积分</view>
 			</view>
-		</view> -->
-		<view class="Mask" v-show="shareShow">
-			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
-			<view class="Toshare" @click="Toshare"></view>
-			<view class="Tocancel" @click="Tocancel"></view>
+		</view>
+		<view class="fiexd">
+			<image src="../../static/image/background03.png" mode=""></image>
 		</view>
 	</view>
 </template>
-
 <script>
-import seckill from '../../components/seckill/seckill.vue';
-import { loadIndexs } from '@/api/index.js';
-import { getUserInfo } from '@/api/user.js';
-import { setCoupons } from '@/api/functionalUnit.js';
-import { getBargainList } from '@/api/product.js';
-import { interceptor } from '@/utils/loginUtils';
-import { mapState } from 'vuex';
+	// import seckill from '../../components/seckill/seckill.vue';
+	// import { loadIndexs } from '@/api/index.js';
+	// import { getUserInfo } from '@/api/user.js';
+	// import { setCoupons } from '@/api/functionalUnit.js';
+	// import { getBargainList } from '@/api/product.js';
+	// import { interceptor } from '@/utils/loginUtils';
+	import {
+		mapState
+	} from 'vuex';
+
+	export default {
+		components: {
 
-export default {
-	components: {
-		seckill
-	},
-	watch: {
-		//自适应swiper高度
-		checkid(newValue, oldValue) {
-			let obj = this;
-			if (newValue == 0) {
-				let bHeight = Math.ceil(obj.bastList.length / 2);
-				obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-			}
-			if (newValue == 1) {
-				let bHeight = Math.ceil(obj.goodsList.length / 2);
-				obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-			}
-			if (newValue == 2) {
-				let bHeight = Math.ceil(obj.bastBanner.length / 2);
-				obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-			}
 		},
-		// 初次加载页面高度时修改页面高度
-		bastList(newValue, oldValue) {
-			let obj = this;
-			let bHeight = Math.ceil(newValue.length / 2);
-			obj.$nextTick(function() {
-				uni.createSelectorQuery()
-					.select('#list-box')
-					.fields(
-						{
-							size: true
-						},
-						function(data) {
-							obj.pageProportion = data.width / 750;
-							obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
-						}
-					)
-					.exec();
-			});
-		}
-	},
-	data() {
-		return {
-			shareShow: false, //分享海报
-			pageProportion: 0, //保存页面基于750宽度的比例
-			swiperHeight: 0,
-			checkid: 0,
-			titleNViewBackground: '',
-			swiperCurrent: 0,
-			swiperLength: 0,
-			bargainlist: [], //砍价商品
-			carouselList: [{},{},{}], //轮播列表
-			goodsList: [], //最新商品列表
-			bastList: [], //精品推荐列表
-			bastBanner: [], //促销商品列表
-			menusList: [], //头部菜单
-			page: 1,
-			limit: 5,
-			userServant: [
-				{
-					image: ''
+		watch: {
+			//自适应swiper高度
+			checkid(newValue, oldValue) {
+				let obj = this;
+				if (newValue == 0) {
+					let bHeight = Math.ceil(obj.bastList.length / 2);
+					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
 				}
-			], //用户推广服务
-			couponArray: [], //可领取优惠券
-			
-			recommend: [
-				{
-					id: 0,
-					re_title: '精选',
-					re_name: '为你推荐'
-				},
-				{
-					id: 1,
-					re_title: '最新',
-					re_name: '最新好货优选'
-				},
-				{
-					id: 2,
-					re_title: '便宜好货',
-					re_name: '90天便宜好货'
+				if (newValue == 1) {
+					let bHeight = Math.ceil(obj.goodsList.length / 2);
+					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
 				}
-			],
-			actTime: new Date()
-		};
-	},
-	computed: {
-		...mapState(['loginInterceptor']),
-		...mapState('user', ['hasLogin','userInfo'])
-	},
-	onLoad: function(option) {
-		// #ifndef MP
-		if (option.spread) {
-			// 存储其他邀请人
-			uni.setStorageSync('spread', option.spread);
-		}
-		// #endif
-		// #ifdef MP
-		if (option.scene) {
-			// 存储小程序邀请人
-			uni.setStorage({
-				key: 'spread_code',
-				data: option.scene
-			});
-		}
-		// #endif
-	},
-	onShow: function() {
-		// 判断是否强制登录
-		if (this.loginInterceptor && !this.hasLogin) {
-			// 登录拦截
-			interceptor();
-		}
-		this.loadData();
-		this.getBargainList();
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData();
-	},
-	// #ifndef MP
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		//跳转到搜索页面
-		this.clickSearch();
-	},
-	//点击导航栏 buttons 时触发
-	onNavigationBarButtonTap(e) {
-		const index = e.index;
-		if (index === 0) {
-			this.$api.msg('点击了扫描');
-		} else if (index === 1) {
-			// #ifdef APP-PLUS
-			const pages = getCurrentPages();
-			const page = pages[pages.length - 1];
-			const currentWebview = page.$getAppWebview();
-			currentWebview.hideTitleNViewButtonRedDot({
-				index
-			});
-			// #endif
-			uni.navigateTo({
-				url: '/pages/user/notice'
-			});
-		}
-	},
-	// #endif
-	methods: {
-		//砍价商品推荐详情页
-		navToDetailPages(item) {
-			let id = item.product_id;
-			//let type = 2;
-		
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		openSubscribe: function(e) {
-			let page = e;
-			// #ifndef MP
-			uni.navigateTo({
-				url: page
-			});
-			// #endif
-			// #ifdef MP
-			uni.showLoading({
-				title: '正在加载'
-			});
-			openBargainSubscribe()
-				.then(res => {
-					uni.hideLoading();
-					uni.navigateTo({
-						url: page
-					});
-				})
-				.catch(err => {
-					uni.hideLoading();
-				});
-			// #endif
-		},
-		getBargainList() {
-			let that = this;
-		
-			getBargainList({
-				page: that.page,
-				limit: that.limit
-			})
-				.then(function(res) {
-					that.$set(that, 'bargainlist', res.data.slice(0, 2));
-				})
-				.catch(res => {
-					console.log(res, 'getBargainList');
-				});
-		},
-		Mask() {
-			this.MaskShow = false;
-			this.shareShow = true;
-			uni.setStorage({
-				key: 'FirstEntry',
-				data: true,
-				success: function() {
-					console.log(uni.getStorageSync('FirstEntry'), 'Mask');
+				if (newValue == 2) {
+					let bHeight = Math.ceil(obj.bastBanner.length / 2);
+					obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
 				}
-			});
-		},
-		Toshare() {
-			if (this.userInfo == '') {
-				getUserInfo({})
-					.then(({ data }) => {
-						this.setUserInfo(data);
-						this.userInfo = data;
-					})
-					.catch(e => {});
-			} else {
-				this.shareShow = false;
-				uni.navigateTo({
-					url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
+			},
+			// 初次加载页面高度时修改页面高度
+			bastList(newValue, oldValue) {
+				let obj = this;
+				let bHeight = Math.ceil(newValue.length / 2);
+				obj.$nextTick(function() {
+					uni.createSelectorQuery()
+						.select('#list-box')
+						.fields({
+								size: true
+							},
+							function(data) {
+								obj.pageProportion = data.width / 750;
+								obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
+							}
+						)
+						.exec();
 				});
 			}
 		},
-		Tocancel() {
-			this.shareShow = false;
-		},
-		// 监听切换事件
-		listChange(e) {
-			this.checkid = e.detail.current;
-		},
-		// 點擊搜索框
-		clickSearch() {
-			uni.navigateTo({
-				url: '/pages/product/search'
-			});
-		},
-		// 点击触发领取优惠券
-		setCoupons(item) {
-			// 判断是否已经领取了优惠券
-			let obj = this;
-			uni.showModal({
-				title: '领取提示',
-				content: '是否领取优惠券',
-				success(e) {
-					if (e.confirm) {
-						setCoupons({ couponId: item.id }).then(e => {
-							item.is_use = true;
-							uni.showToast({
-								title: '领取成功',
-								type: 'top',
-								duration: 2000
-							});
-						});
+		data() {
+			return {
+				carouselList: [{
+						pic: '../../static/image/background02.png'
+					},
+					{
+						pic: '../../static/image/baodan.png'
 					}
-				}
-			});
-		},
-		//商品种类切换
-		change(item) {
-			let id = item;
-			this.checkid = id;
-			if (this.checkid == 1) {
-				// console.log(1);
-				this.detail = this.selected_detail;
-			} else if (this.checkid == 2) {
-				// console.log(2);
-				this.detail = this.new_product;
-			} else {
-				this.detail = this.cheap_good;
-			}
-		},
-		// 监听图片加载完成
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 请求载入数据
-		async loadData() {loadIndexs({})
-				.then(({ data }) => {
-					let goods = data.info;
-					// this.carouselList = data.banner;
-					// this.swiperLength = this.carouselList.length;
-					this.menusList = data.menus;
-					this.goodsList = goods.firstList; //最新商品
-					this.bastList = goods.bastList; //精品推荐
-					this.bastBanner = data.benefit; //促销单品
-					this.$set(this, 'couponArray', data.couponList); //保存卡包券
+				], //轮播列表
+				page: 1,
+				limit: 5,
 
-					uni.stopPullDownRefresh();
-				})
-				.catch(e => {
-					uni.stopPullDownRefresh();
-				});
-			
-		},
-		//轮播图切换修改背景色
-		swiperChange(e) {
-			const index = e.detail.current;
-			this.swiperCurrent = index;
-			this.titleNViewBackground = this.carouselList[index].background;
-		},
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
+			};
 		},
+		methods: {
+			carouselList(item) {
 
-		// 轮播图跳转
-		bannerNavToUrl(item) {
-			// #ifdef H5
-			if (item.wap_url.indexOf('http') > 0) {
-				window.location.href = item.wap_url;
 			}
-			// #endif
-			//测试数据没有写id,用title代替
-			uni.navigateTo({
-				url: item.wap_url
-			});
 		}
+
 	}
-};
 </script>
 
-<style lang="scss">
-	.container {
+<style lang="scss" scoped>
+	page {
+		margin: 0;
+		padding: 0;
+		height: 100%;
+
 		background-color: #D4FDF9;
 	}
-.Mask {
-	width: 100%;
-	height: 100vh;
-	position: fixed;
-	z-index: 99999;
-	background-color: rgba(0, 0, 0, 0.7);
-	top: 0;
-	image {
-		width: 100%;
-		height: 100vh;
+
+	.container {
+		min-height: 100%;
+		height: auto;
 	}
-}
-// 热销商品
-	.hot-goods {
-		margin: 0 25rpx;
-		padding: 5rpx 25rpx 30rpx 25rpx;
-		background-color: #fff;
-		border-radius: 10rpx;
-		.hot-headers {
-			margin: 25rpx 0;
-			width: 100%;
-			display: flex;
-			.img {
-				width: 32rpx;
-				height: 32rpx;
-				margin-right: 10rpx;
+
+	.searchbackground {
+		position: relative;
+
+		.backgroundimg {
+			position: absolute;
+			width: 750rpx;
+
+			image {
+				width: 100%;
 			}
-			.hot-title {
-				font-size: 30rpx;
-				margin-right: 15rpx;
+		}
+	}
+
+	.fiexd {
+		position: fiexd;
+		bottom: 0;
+		width: 750rpx;
+		height: 750rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.content {
+		flex-direction: column;
+		justify-content: center;
+		height: 100%;
+
+		.input-box {
+			position: absolute;
+			left: 0;
+			top: 0;
+			margin: 66rpx 25rpx;
+			justify-content: center;
+			background: #FFFFFF;
+			box-shadow: 0rpx 1rpx 21rpx 0rpx rgba(255, 255, 255, 0.12);
+			border-radius: 35rpx;
+			width: 700rpx;
+			height: 70rpx;
+
+			.input {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #C4C4C4;
+				line-height: 38rpx;
 			}
-			.more {
-				line-height: 1;
-				padding: 5rpx 10rpx 5rpx 15rpx;
-				text-align: center;
-				font-size: 20rpx;
-				border-radius: 15rpx;
-				color: #ffffff;
-				background: linear-gradient(90deg, rgba(250, 52, 38, 1) 0%, rgba(249, 30, 83, 1) 100%);
+		}
+
+		.carousel {
+			margin-top: 165rpx;
+			width: 700rpx;
+			height: 370rpx;
+
+			.carousel-item {
 				image {
-					width: 20rpx;
-					height: 20rpx;
+					width: 100%;
+					height: 100%;
 				}
 			}
 		}
-		.hot-lists {
-			line-height: 1;
-			display: flex;
-			.hot-produce {
+
+		.customs {
+			margin-top: 20rpx;
+			width: 700rpx;
+			height: 180rpx;
+
+			image {
 				width: 100%;
-				height: 260rpx;
-				border-top: 1px solid #f0f0f0;
+				height: 100%;
+			}
+		}
+
+		.customs-content {
+			position: relative;
+			padding-top: 14rpx;
+
+			.backgroundimg1 {
+				width: 700rpx;
+				height: 300rpx;
+
+				image {
+					height: 100%;
+					width: 100%;
+				}
+			}
+
+			.box {
+				position: absolute;
+				margin-top: -250rpx;
+				padding: 0 38rpx;
 				display: flex;
-				padding-top: 28rpx;
-				.produce-image {
+				justify-content: space-between;
+				align-items: center;
+
+				.customs-img {
 					width: 200rpx;
 					height: 200rpx;
+
 					image {
-						width: 200rpx;
-						height: 200rpx;
-						border: 1px solid #f0f0f0;
+						width: 100%;
+						height: 100%;
 					}
 				}
-				.produce-content {
-					// flex-direction: column;
-					margin-left: 30rpx;
+
+				.customstext {
+					margin-left: 14rpx;
 					height: 200rpx;
-					position: relative;
-					width: calc(100% - 200rpx - 30rpx);
-					.produce-name {
-						font-size: 28rpx;
-						font-weight: bold;
-						line-height: 35rpx;
-						color: #343434;
-					}
-					.produce-info {
-						font-size: 20rpx;
-						margin-top: 25rpx;
+					display: flex;
+					flex-direction: column;
+					justify-content: space-around;
+
+					.customstext1 {
+						.customstext-title {
+							font-size: 34rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #3F7C1F;
+							line-height: 20rpx;
+						}
+
+						.customstext-product {
+							margin-top: 25rpx;
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #ABD56F;
+							line-height: 20rpx;
+						}
 					}
-					.produce-price {
+
+					.customsprice {
 						display: flex;
-						align-items: flex-end;
-						color: #ff383e;
-						font-size: 24rpx;
-						margin-top: 70rpx;
-						font-weight: bold;
-						text {
-							font-size: 36rpx;
+						align-items: center;
+						justify-content: space-between;
+
+						.customsprice-left {
+							font-size: 28rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #FF0000;
+							line-height: 20rpx;
 						}
-						.produce-price-1 {
-							font-size: 22rpx;
+
+						.customsprice-between {
+							font-size: 42rpx;
+							font-family: PingFang SC;
 							font-weight: 500;
-							text-decoration: line-through;
-							color: rgba(170, 170, 170, 1);
-							margin-left: 20rpx;
+							color: #FF0000;
+							line-height: 20rpx;
 						}
-					}
-					.produce-price1 {
-						height: 100%;
-						letter-spacing: 3rpx;
-						color: #ff383e;
-						font-size: 24rpx;
-						font-weight: bold;
-						.produce-center {
-							width: 100%;
-							position: absolute;
-							bottom: 0;
+
+						.customsprice-right {
+							margin-left: 80rpx;
 							display: flex;
-							justify-content: space-between;
+							justify-content: center;
 							align-items: center;
-							.kanjia_word {
-								.word-1 {
-									font-size: 22rpx;
-									color: #666666;
-								}
-								.word-2 {
-									font-size: 28rpx;
-									color: #ff383e;
-									margin-top: 10rpx;
-								}
-							}
-							.kanjia_button {
-								height: 50rpx;
-								width: 150rpx;
-								border-radius: 25rpx;
-								font-size: 26rpx;
-								font-weight: 500;
-								color: #ff383e;
-								border: 1px solid rgba(255, 56, 62, 1);
-							}
+							width: 137rpx;
+							height: 52rpx;
+							background: #3F7C1F;
+							border-radius: 26rpx;
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: 400;
+							color: #FFFFFF;
 						}
 					}
 				}
 			}
 		}
-	}
-/* #ifdef MP */
-.mp-height {
-	height: 44px;
-}
-.input-box {
-	position: fixed;
-	top: 0;
-	left: 0;
-	width: 100%;
-	padding: 25rpx;
-	background-color: #ffffff;
-	z-index: 999;
-	height: 44px;
-	.iconsearch {
-		font-size: 50rpx;
-	}
-	.input-content {
-		border-radius: 99rpx;
-		flex-grow: 1;
-		padding: 10rpx 30rpx;
-		background-color: rgba(231, 231, 231, 0.7);
-		.input {
-			flex-grow: 1;
-			input {
-				font-size: $font-lg;
-			}
-		}
-	}
-	.input-button {
-		padding-left: 20rpx;
-		font-size: $font-lg;
-		height: 100%;
-	}
-}
-page {
-	.cate-section {
-		position: relative;
-		z-index: 5;
-		border-radius: 16rpx 16rpx 0 0;
-		margin-top: -20rpx;
-	}
-}
-/* #endif */
-.bg-contain {
-	height: 460rpx;
-	width: 750rpx;
-	image {
-		width: 100%;
-		height: 100%;
-	}
-}
-page {
-	background: #f7f8f7;
-}
-.m-t {
-	margin-top: 16rpx;
-}
-/* 头部 轮播图 */
-.carousel-section {
-	position: relative;
-	padding-top: 10px;
-	overflow: hidden;
-
-	.titleNview-placing {
-		height: var(--status-bar-height);
-		padding-top: 44px;
-		box-sizing: content-box;
-	}
 
-	.titleNview-background {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-		height: 426rpx;
-		transition: 0.4s;
-	}
-	.carousel {
-		width: 100%;
-		height: 240rpx;
-		image {
+		.jifen-content {
+			
 			width: 700rpx;
-			height: 370rpx;
-		}
-		.carousel-item {
-			width: 100%;
-			height: 100%;
-			padding: 0 28rpx;
-			overflow: hidden;
-		}
-
-		image {
-			width: 100%;
-			height: 100%;
-			border-radius: $border-radius-sm;
-		}
-	}
-}
-.swiper-dots {
-	display: flex;
-	position: absolute;
-	left: 60rpx;
-	bottom: 15rpx;
-	width: 72rpx;
-	height: 36rpx;
-	background-size: 100% 100%;
-	.num {
-		width: 36rpx;
-		height: 36rpx;
-		border-radius: 50px;
-		font-size: 24rpx;
-		color: #fff;
-		text-align: center;
-		line-height: 36rpx;
-	}
-
-	.sign {
-		position: absolute;
-		top: 0;
-		left: 50%;
-		line-height: 36rpx;
-		font-size: 12rpx;
-		color: #fff;
-		transform: translateX(-50%);
-	}
-}
-/* 分类 */
-.cate-section {
-	display: flex;
-	justify-content: space-around;
-	align-items: center;
-	flex-wrap: wrap;
-	padding: 30rpx 22rpx;
-	.cate-item {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-	}
-	/* 原图标颜色太深,不想改图了,所以加了透明度 */
-	image {
-		width: 88rpx;
-		height: 88rpx;
-		margin-bottom: 14rpx;
-		border-radius: 50%;
-		opacity: 0.7;
-	}
-}
-// 中间广告图片
-.ad-1 {
-	width: 100%;
-	height: 210rpx;
-	padding: 10rpx 0;
-	background: #fff;
-	image {
-		width: 100%;
-		height: 100%;
-	}
-}
-/*公用边框样式*/
-%icon {
-	margin-right: 10rpx;
-	display: inline-block;
-	padding: 2rpx 10rpx;
-	border: 1rpx solid $color-yellow;
-	color: $color-yellow;
-	line-height: 1;
-	font-size: $font-base;
-	border-radius: 10rpx;
-}
-.f-header {
-	display: flex;
-	align-items: center;
-	height: 92rpx;
-	padding: 6rpx 30rpx 8rpx;
-	image {
-		flex-shrink: 0;
-		width: 80rpx;
-		height: 80rpx;
-		margin-right: 20rpx;
-	}
-	.tit-box {
-		@extend %font-title-box;
-	}
-	.tit {
-		@extend %font-title;
-	}
-	.iconenter {
-		font-size: $font-lg + 2rpx;
-		color: $font-color-light;
-	}
-	.f-left-icon {
-		@extend %f-left-icon;
-	}
-	.iconfont {
-		font-size: $font-sm - 2rpx;
-	}
-}
-// 会员升级礼包
-.uservip {
-	border-radius: $border-radius-sm;
-	background-color: white;
-	box-shadow: $box-shadow;
-	height: 300rpx;
-	margin: 0 30rpx;
-	image {
-		height: 100%;
-		width: 300rpx;
-	}
-	.detail {
-		position: relative;
-		padding: 20rpx;
-		height: 100%;
-		.icon {
-			@extend %icon;
-		}
-		.price-box {
-			position: absolute;
-			bottom: 20rpx;
-			width: calc(100% - 40rpx);
-			.price {
-				font-size: $font-lg + 2rpx;
-				font-weight: bold;
-				color: $font-color-base;
-			}
-			.text {
-				color: $color-gray;
-				font-size: $font-sm;
-			}
-		}
-		.title {
-			font-size: $font-lg;
-			font-weight: bold;
-		}
-	}
-}
+			display: flex;
 
-/* 猜你喜欢 */
-.guess-section {
-	display: flex;
-	flex-wrap: wrap;
-	padding: 0 30rpx;
-	.guess-item {
-		overflow: hidden;
-		display: flex;
-		flex-direction: column;
-		width: 48%;
-		margin-bottom: 4%;
-		border-radius: $border-radius-sm;
-		background-color: white;
-		box-shadow: $box-shadow;
-		&:nth-child(2n + 1) {
-			margin-right: 4%;
-		}
-	}
-	.image-wrapper {
-		width: 100%;
-		height: 330rpx;
-		border-radius: 3px;
-		overflow: hidden;
-		image {
-			width: 100%;
-			height: 100%;
-			opacity: 1;
-		}
-	}
-	.title {
-		font-size: $font-base;
-		color: $font-color-dark;
-		font-weight: bold;
-		line-height: 80rpx;
-	}
-	.price {
-		font-size: $font-lg;
-		color: $font-color-base;
-		font-weight: bold;
-		line-height: 1;
-		line-height: 80rpx;
-	}
+			flex-wrap: wrap;
+			justify-content: space-around;
 
-	.icon {
-		@extend %icon;
-	}
 
-	.detail {
-		line-height: 1;
-	}
-	.tip {
-		color: white;
-		background-color: $color-yellow;
-		line-height: 1.5;
-		font-size: $font-sm;
-		padding-left: 20rpx;
-	}
-}
+			.jifen-box {
+				margin: 20rpx 0;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				width: 336rpx;
+				height: 512rpx;
+				background: #E6FCFA;
+				box-shadow: 0px 7px 10px 1px #8BAFAB;
+				.img {
+					margin-top: 20rpx;
+					height: 312rpx;
+					width: 312rpx;
+					image {
+						height: 100%;
+						width: 100%;
+					}
+				}
+				.jifen-list {
+					margin-left: -80rpx;
+					.box-title {
+						.top {
+							padding: 20rpx 0 10rpx 0;
+							font-size: 30rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #3F7C1F;
+							line-height: 35rpx;
+						}
 
-// 推荐
-.recommend {
-	width: 95%;
-	height: 155rpx;
-	margin: 0rpx auto;
-	padding-top: 30rpx;
-	font-size: 26rpx;
-	text-align: center;
-	color: #333333;
-	align-items: flex-start;
+						.button {
+							padding-bottom: 20rpx;
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #3F7C1F;
+							line-height: 35rpx;
+							opacity: 0.8;
+						}
+					}
+					.box-price {
+						display: flex;
+						align-items: center;
+						.pricebox {
+							height: 25rpx;
+							width: 25rpx;
+							image {
+								height: 100%;
+								width: 100%;
+							}
+						}
 
-	.recommend_list {
-		width: 33%;
-	}
-	.re_title {
-		font-size: 32rpx;
-		font-weight: bold;
-	}
-	.re_name {
-		color: #999999;
-		padding-top: 10rpx;
-	}
-	.selected_icon {
-		width: 25rpx;
-		height: 10rpx;
-		margin: 0px auto;
-		display: none;
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.active {
-		display: block;
-	}
-	.active_color {
-		color: #dc4d46 !important;
-	}
-}
+						.price-left {
+							font-size: 36rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FF0000;
+							line-height: 35rpx;
+						}
 
-// 列表
-.list-box-h {
-	height: 1550rpx;
-}
-// 优惠券
-.coupon-list {
-	display: inline-block;
-}
-.row {
-	border-radius: 15rpx;
-	margin: 25rpx;
-	height: 155rpx;
-	// width: 552rpx;
-	overflow: hidden;
-	background-color: #ffffff;
-	padding-right: 25rpx;
-	.list-interval {
-		border: 1px dashed $border-color-light;
-		height: 100%;
-		.top,
-		.bottom {
-			border-radius: 100rpx;
-			width: 30rpx;
-			height: 30rpx;
-			position: absolute;
-			background-color: $page-color-base;
-			right: -15rpx;
-		}
-		.top {
-			top: -18rpx;
-		}
-		.bottom {
-			bottom: -18rpx;
-		}
-	}
-	.list-money {
-		height: 100%;
-		min-width: 155rpx;
-		text-align: center;
-		image {
-			height: 100%;
-			width: 20rpx;
-		}
-		.list-money-text {
-			flex-grow: 1;
-			padding: 0 25rpx;
-			.tit {
-				text-align: center;
-				padding: 15rpx 0rpx;
-				font-size: 55rpx;
-				color: $color-red;
-				font-weight: bold;
-				&.noAction {
-					color: $font-color-light;
-				}
-			}
-			.price {
-				padding-bottom: 25rpx;
-				color: $font-color-light;
-			}
-		}
-	}
-	.row_list_right {
-		// flex-grow: 1;
-		min-width: 200rpx;
-		padding-left: 25rpx;
-		line-height: 1;
-		.right_time {
-			padding: 10rpx 0rpx;
-			color: $font-color-light;
-			font-size: $font-sm;
-		}
-		.right_top {
-			margin: 15rpx 0;
-			.right_name {
-				font-size: $font-base;
-				color: #bc253a;
-				font-weight: bold;
-			}
-			.right_title {
-				font-size: $font-base;
-				color: $font-base;
-				font-weight: bold;
-				&.noAction {
-					color: $font-color-light;
+						.price-right {
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							text-decoration: line-through;
+							color: #999999;
+							line-height: 35rpx;
+						}
+					}
 				}
 			}
 		}
 	}
-	.right_use {
-		margin: 15rpx 0;
-		padding: 10rpx;
-		width: 160rpx;
-		text-align: center;
-		color: #fff;
-		background-color: #bc253a;
-		border-radius: 50rpx;
-		font-size: $font-sm;
-		&.noAction {
-			background-color: $font-color-light;
-		}
-	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
-	}
-}
-</style>
-=======
-<template>
-	<view class="">
-		1111
-	</view>
-</template>
-
-<script>
-</script>
-
-<style lang="scss">
 </style>
->>>>>>> 1062124a14605e6952753b8ba2e3f401c676404f

+ 289 - 0
pages/money/account.vue

@@ -0,0 +1,289 @@
+<template>
+	<view class="content">
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<view class="row b-b">
+					<text class="tit">姓名</text>
+					<input class="input" v-model="tabItem.orderList.name" type="text" placeholder="提款人姓名" placeholder-class="placeholder" />
+				</view>
+				<view class="row b-b">
+					<text class="tit">{{ tabIndex == 0 ? '账号' : '银行卡号' }}</text>
+					<input class="input" v-model="tabItem.orderList.code" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
+				</view>
+				<view class="row b-b" v-if="tabIndex == 1">
+					<text class="tit">所属银行</text>
+					<input class="input" v-model="tabItem.orderList.bankName" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
+				</view>
+			</swiper-item>
+		</swiper>
+
+		<button class="add-btn up" @click="confirm">提交申请</button>
+	</view>
+</template>
+
+<script>
+import { aliInfo, bankInfo, setAliInfo, setBankInfo } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '支付宝',
+					loadingType: 'more',
+					orderList: {
+						name: '',
+						code: '',
+						id: ''
+					}
+				},
+				{
+					state: 1,
+					text: '银行卡',
+					loadingType: 'more',
+					orderList: {
+						name: '',
+						code: '',
+						bankName: '',
+						id: ''
+					}
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		this.tabCurrentIndex = +options.state || 0;
+		// this.loadAli();
+		// this.loadBank();
+	},
+
+	methods: {
+		//加载数据
+		loadAli(source) {
+			aliInfo({}).then(({ data }) => {
+				let order = this.navList[0].orderList;
+				this.$set(order, 'name', data.fullname);
+				this.$set(order, 'code', data.alino);
+				this.$set(order, 'id', data.id);
+			});
+		},
+		loadBank() {
+			bankInfo({}).then(({ data }) => {
+				let order = this.navList[1].orderList;
+				this.$set(order, 'name', data.fullname);
+				this.$set(order, 'code', data.bankno);
+				this.$set(order, 'bankName', data.bank);
+				this.$set(order, 'id', data.id);
+			});
+		},
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		},
+		// 提交保存
+		confirm() {
+			let obj = this;
+			let arr = obj.navList[obj.tabCurrentIndex].orderList;
+			let pages = getCurrentPages(); //获取所有页面栈实例列表
+			console.log(pages);
+			let nowPage = pages[pages.length - 1]; //当前页页面实例
+			let prevPage = pages[pages.length - 2]; //上一页页面实例
+			console.log(prevPage);
+			// prevPage.$vm.sh = 100;   //修改上一页data里面的sh参数值为100
+			if (obj.tabCurrentIndex == 1) {
+				if (!arr.name) {
+					return this.$api.msg('请输入提款人姓名');
+				}
+				if (!arr.bankName) {
+					return this.$api.msg('请输入所属银行');
+				}
+				if (!arr.code) {
+					return this.$api.msg('请输入银行卡号');
+				}
+				let data = {
+					fullname: arr.name,
+					bank: arr.bankName,
+					bankno: arr.code
+				};
+				// #ifdef H5
+				prevPage.$vm.bankData = data;
+				// #endif
+				// #ifdef MP
+				prevPage.setData({
+					bankData: data
+				});
+				// #endif
+				// obj.setBankInfo({
+				// 	fullname: arr.name,
+				// 	bank: arr.bankName,
+				// 	bankno: arr.code,
+				// 	id:arr.id
+				// });
+				uni.navigateBack({
+					delta: 1
+				});
+			}
+			if (obj.tabCurrentIndex == 0) {
+				if (!arr.name) {
+					return this.$api.msg('请输入提款人姓名');
+				}
+				if (!arr.code) {
+					return this.$api.msg('请输入支付宝账号');
+				}
+				let data = {
+					fullname: arr.name,
+					alino: arr.code
+				};
+				// #ifdef H5
+				prevPage.$vm.aliData = data;
+				// #endif
+
+				// #ifdef MP
+				prevPage.setData({
+					bankData: data
+				});
+				// #endif
+				// obj.setAliInfo({
+				// 	fullname: arr.name,
+				// 	alino: arr.code,
+				// 	id:arr.id
+				// });
+				uni.navigateBack({
+					delta: 1
+				});
+			}
+		},
+		/* 保存银行卡详细 */
+		setBankInfo(obj) {
+			setBankInfo(obj)
+				.then(e => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					this.$api.prePage().dataUp();
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 1500);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 修改支付宝信息
+		setAliInfo(obj) {
+			setAliInfo(obj)
+				.then(e => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					this.$api.prePage().dataUp();
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 1500);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+
+.swiper-box {
+	height: 750rpx;
+}
+
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+
+.add-btn {
+	&.up {
+		background-color: $base-color;
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+</style>

+ 416 - 0
pages/money/pay.vue

@@ -0,0 +1,416 @@
+<template>
+	<view class="app">
+		<view class="price-box">
+			<text>支付金额</text>
+			<text class="price">{{ money }}</text>
+		</view>
+		<view class="pay-type-list">
+			<!-- #ifndef APP-PLUS -->
+			<view class="type-item b-b" @click="changePayType(1)">
+				<text class="icon iconfont iconweixin"></text>
+				<view class="con">
+					<text class="tit">微信支付</text>
+					<text>推荐使用微信支付</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
+			</view>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<view class="type-item b-b" @click="changePayType(2)">
+				<text class="icon iconfont iconzhifubao"></text>
+				<view class="con"><text class="tit">支付宝支付</text></view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
+			</view>
+			<!-- #endif -->
+			<view class="type-item" @click="changePayType(3)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">余额支付</text>
+					<text>可用余额 ¥{{ now_money }}</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
+			</view>
+		</view>
+		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
+	</view>
+</template>
+
+<script>
+import { balance } from '@/api/wallet.js';
+import { createOrderkey, computedOrderkey, orderPay } from '@/api/order.js';
+import { getUserInfo } from '@/api/user.js';
+
+// #ifdef H5
+
+import weixinObj from '@/plugin/jweixin-module/index.js';
+// #endif
+import { mapState, mapMutations } from 'vuex';
+export default {
+	data() {
+		return {
+			
+			// #ifdef H5
+			payName: 'weixin',
+			payType: 1, //支付类型
+			// #endif
+			// #ifdef MP-WEIXIN
+			payName: 'weixin',
+			payType: 1, //支付类型
+			// #endif
+			// #ifdef APP-PLUS
+			payType: 3,
+			payName: 'yue',
+			// #endif
+			orderInfo: {},
+			money: 0.0, //订单金额
+			now_money: 0.0, //余额
+			orderKey: '',
+			orderId: '', //保存订单id
+			payLoding: false, //判断是否支付中
+			type: '', //判断是否从订单中进入
+			// #ifdef H5
+			froms: '', //保存h5中数据来源对象
+			// #endif
+			pinkid: '', //保存拼团商品id
+			checkedAuto: 0, //判断是否为自动拼团
+			topify: '',
+			is_drop: '',
+		};
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj']),
+		// #endif
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	onLoad(options) {
+		if(options.isdrop) {
+			this.is_drop = options.isdrop
+		}
+ 		this.checkedAuto = options.checked || 0;
+		this.topify = options.topify || 0;
+		if (options.type == 1) {
+			this.type = 1;
+			this.orderId = options.ordid;
+			this.money = options.money;
+		} else {
+			this.orderKey = options.key;
+			let prepage = this.$api.prePage();
+			computedOrderkey({
+				orderkey: this.orderKey,
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //地址编号
+				useIntegral: prepage.checkedPoints ? 1 : 0,
+				is_drop: this.is_drop
+			}).then(({ data }) => {
+				// 获取支付金额
+				this.money = data.result.pay_price;
+			});
+		}
+		// 保存pinkid
+		if (options.pinkid) {
+			this.pinkid = options.pinkid;
+		}
+		// 载入余额
+		if ('now_money' in this.userInfo) {
+			this.now_money = this.userInfo.now_money;
+		} else {
+			balance({}).then(({ data }) => {
+				// 获取余额
+				this.now_money = data.now_money;
+			});
+		}
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+		//选择支付方式
+		changePayType(type) {
+			this.payType = type;
+			if (this.payType == 1) {
+				this.payName = 'weixin';
+			}
+			if (this.payType == 2) {
+				this.payName = 'ali';
+			}
+			if (this.payType == 3) {
+				this.payName = 'yue';
+			}
+			// if (this.payType == 4) {
+			// 	this.payName = 'consumer';
+			// }
+		},
+		// 支付金额
+		orderMoneyPay() {
+			let obj = this;
+			orderPay({
+				uni: obj.orderId,
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				paytype: obj.payName ,//支付类型  weixin-微信 yue-余额
+				is_drop: obj.is_drop
+			})
+				.then(e => {
+					console.log(e,'zhifu+++++++++')
+					// 判断是否为余额支付
+					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+						if (e.status == 200) {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					}
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						let da = e.data.result.jsConfig;
+						let data = {
+							// #ifdef H5
+							timestamp: da.timestamp,
+							// #endif
+							// #ifdef MP
+							timeStamp: da.timestamp,
+							// #endif
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								obj.paySuccessTo();
+							},
+							fail: () => {
+								uni.navigateTo({
+									url: '/pages/order/order?state=0'
+								});
+							}
+						};
+						// #ifdef H5
+						if (obj.payName == 'weixin') {
+							weixinObj.chooseWXPay(data);
+						}
+						// #endif
+						// #ifdef MP-WEIXIN
+						if (obj.payName == 'routine') {
+							wx.requestPayment(data);
+						}
+						// #endif
+					}
+					uni.hideLoading();
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					// 支付完成
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		},
+		// 支付成功跳转
+		paySuccessTo() {
+			getUserInfo({})
+				.then(({ data }) => {
+					console.log(data,"data")
+					this.setUserInfo(data);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+			uni.hideLoading();
+			uni.redirectTo({
+				url: '/pages/money/paySuccess?orderid=' + this.orderId
+			});
+		},
+		//确认支付
+		confirm: async function() {
+			let obj = this;
+			uni.showLoading({
+				title: '支付中',
+				mask: true
+			});
+			// 判断是否余额不足
+			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
+				uni.hideLoading();
+				uni.showModal({
+					title: '提示',
+					content: '账户余额不足!',
+					showCancel: false,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				return;
+			}
+			// 支付中
+			obj.payLoding = true;
+			// #ifdef H5
+			// 获取当前是否为微信浏览器
+			obj.froms = uni.getStorageSync('weichatBrowser') || '';
+			// #endif
+			// 判断是否为未支付订单中跳转进入
+			if (obj.type != 1) {
+				// 初次生成订单
+				obj.firstCreateOrder();
+			} else {
+				// 已经生成订单未支付
+				obj.orderMoneyPay();
+			}
+		},
+		// 初次订单创建
+		firstCreateOrder() {
+			let obj = this;
+			// 获取下单页面数据
+			let prepage = obj.$api.prePage();
+
+			let data = {
+				real_name: prepage.addressData.real_name, //联系人名称
+				phone: prepage.addressData.phone, //联系人号码
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //支付地址id
+				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+				payType: obj.payName, //支付类型  weixin-微信 yue-余额
+				mark: prepage.desc, //备注
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				shipping_type: 1, //提货方式 1 快递 2自提
+				automatic: obj.checkedAuto,
+				topify: this.topify,
+				is_drop: obj.is_drop
+			};
+			// 判断是否拼团商品
+			if (obj.pinkid) {
+				data.pinkId = obj.pinkid;
+			}
+			// 生成订单
+			createOrderkey(data, obj.orderKey)
+				.then(({ data, status, msg }) => {
+					// 判断是否支付失败
+					if (data.status == 'ORDER_EXIST') {
+						uni.showModal({
+							title: '提示',
+							content: msg,
+							showCancel: false
+						});
+						uni.hideLoading();
+						obj.payLoding = false;
+						return;
+					}
+					// 保存订单号
+					obj.orderId = data.result.orderId;
+					// 判断是否为余额支付
+					if (obj.payName == 'yue') {
+						if (status == 200 && data.status == 'SUCCESS') {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					} else {
+						// 立即支付
+						obj.orderMoneyPay();
+					}
+				})
+				.catch(e => {
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.app {
+	width: 100%;
+}
+
+.price-box {
+	background-color: #fff;
+	height: 265upx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	font-size: 28upx;
+	color: #909399;
+
+	.price {
+		font-size: 50upx;
+		color: #303133;
+		margin-top: 12upx;
+		&:before {
+			content: '¥';
+			font-size: 40upx;
+		}
+	}
+}
+
+.pay-type-list {
+	margin-top: 20upx;
+	background-color: #fff;
+	padding-left: 60upx;
+	.type-item {
+		height: 120upx;
+		padding: 20upx 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding-right: 60upx;
+		font-size: 30upx;
+		position: relative;
+	}
+
+	.icon {
+		width: 100upx;
+		font-size: 52upx;
+	}
+	.iconyue {
+		color: #fe8e2e;
+	}
+	.iconweixin {
+		color: #36cb59;
+	}
+	.iconzhifubao {
+		color: #01aaef;
+	}
+	.tit {
+		font-size: $font-lg;
+		color: $font-color-dark;
+		margin-bottom: 4upx;
+	}
+	.con {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		font-size: $font-sm;
+		color: $font-color-light;
+	}
+}
+.mix-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 630upx;
+	height: 80upx;
+	margin: 80upx auto 30upx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10upx;
+	/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
+}
+
+.clickbg {
+	background-color: $color-gray !important;
+}
+</style>

+ 376 - 0
pages/money/pay1.vue

@@ -0,0 +1,376 @@
+<template>
+	<view class="app">
+		<view class="price-box">
+			<text>支付金额</text>
+			<text class="price">{{ money }}</text>
+		</view>
+		<view class="pay-type-list">
+			<view class="type-item b-b" @click="changePayType(1)">
+				<text class="icon iconfont iconweixin"></text>
+				<view class="con">
+					<text class="tit">微信支付</text>
+					<text>推荐使用微信支付</text>
+				</view>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 1"></radio></label>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="type-item b-b" @click="changePayType(2)">
+				<text class="icon iconfont iconzhifubao"></text>
+				<view class="con"><text class="tit">支付宝支付</text></view>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 2"></radio></label>
+			</view>
+			<!-- #endif -->
+			<view class="type-item" @click="changePayType(3)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">余额支付</text>
+					<text>可用余额 ¥{{ now_money }}</text>
+				</view>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 3"></radio></label>
+			</view>
+		</view>
+		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
+	</view>
+</template>
+
+<script>
+import { balance } from '@/api/wallet.js';
+import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
+import { mapState } from 'vuex';
+export default {
+	data() {
+		return {
+			payType: 1, //支付类型
+			// #ifdef H5
+			payName: 'weixin',
+			// #endif
+			// #ifdef MP-WEIXIN
+			payName: 'weixin',
+			// #endif
+			orderInfo: {},
+			money: 0.0, //订单金额
+			now_money: 0.0, //余额
+			orderKey: '',
+			orderId: '', //保存订单id
+			payLoding: false, //判断是否支付中
+			type: '', //判断是否从订单中进入
+			// #ifdef H5
+			froms: '', //保存h5中数据来源对象
+			// #endif
+			pinkid: '', //保存拼团商品id
+			isdrop: 0
+		};
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj'])
+		// #endif
+	},
+	onLoad(options) {
+		if(options.isdrop) {
+			this.isdrop = options.isdrop*1
+		}
+		if (options.type == 1) {
+			this.type = 1;
+			this.orderId = options.ordid;
+			this.money = options.money;
+		} else {
+			this.orderKey = options.key;
+			let prepage = this.$api.prePage();
+			computedOrderkey({
+				orderkey: this.orderKey,
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //地址编号
+				useIntegral: prepage.checkedPoints ? 1 : 0,
+				is_drop: this.isdrop
+			}).then(({ data }) => {
+				// 获取支付金额
+				this.money = data.result.pay_price;
+			});
+		}
+		// 保存pinkid
+		if (options.pinkid) {
+			this.pinkid = options.pinkid;
+		}
+		// 载入余额
+		balance({}).then(({ data }) => {
+			// 获取余额
+			this.now_money = data.now_money;
+		});
+	},
+	methods: {
+		//选择支付方式
+		changePayType(type) {
+			this.payType = type;
+			if (this.payType == 1) {
+				this.payName = 'weixin';
+			}
+			if (this.payType == 2) {
+				this.payName = 'ali';
+			}
+			if (this.payType == 3) {
+				this.payName = 'yue';
+			}
+		},
+		// 支付金额
+		orderMoneyPay() {
+			let obj = this;
+			orderPay({
+				uni: obj.orderId,
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				paytype: obj.payName //支付类型  weixin-微信 yue-余额
+			})
+				.then(e => {
+					// 判断是否为余额支付
+					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+						if (e.status == 200) {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					}
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						let da = e.data.result.jsConfig;
+						let data = {
+							// #ifdef H5
+							timestamp: da.timestamp,
+							// #endif
+							// #ifdef MP
+							timeStamp: da.timestamp,
+							// #endif
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								obj.paySuccessTo();
+							},
+							fail: () => {
+								uni.navigateTo({
+									url: '/pages/order/order?state=0'
+								});
+							}
+						};
+						// #ifdef H5
+						if(obj.payName == 'weixin'){
+						obj.weichatObj.chooseWXPay(data);
+						}
+						// #endif
+						// #ifdef MP-WEIXIN
+						if(obj.payName == 'routine'){
+							wx.requestPayment(data);
+						}
+						// #endif
+					}
+					uni.hideLoading();
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					// 支付完成
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		},
+		// 支付成功跳转
+		paySuccessTo() {
+			uni.hideLoading();
+			uni.redirectTo({
+				url: '/pages/money/paySuccess?orderid=' + this.orderId
+			});
+		},
+		//确认支付
+		confirm: async function() {
+			let obj = this;
+			uni.showLoading({
+				title: '支付中',
+				mask: true
+			})
+			// 判断是否余额不足
+			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
+				uni.showModal({
+					title: '提示',
+					content: '账户余额不足!',
+					showCancel: false,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				return;
+			}
+			// 支付中
+			obj.payLoding = true;
+			// #ifdef H5
+			// 获取当前是否为微信浏览器
+			obj.froms = uni.getStorageSync('weichatBrowser') || '';
+			// #endif
+			// 判断是否为未支付订单中跳转进入
+			if (obj.type != 1) {
+				// 初次生成订单
+				obj.firstCreateOrder();
+			} else {
+				// 已经生成订单未支付
+				obj.orderMoneyPay();
+			}
+		},
+		// 初次订单创建
+		firstCreateOrder() {
+			let obj = this;
+			// 获取下单页面数据
+			let prepage = obj.$api.prePage();
+
+			let data = {
+				real_name: prepage.addressData.real_name, //联系人名称
+				phone: prepage.addressData.phone, //联系人号码
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //支付地址id
+				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+				payType: obj.payName, //支付类型  weixin-微信 yue-余额
+				mark: prepage.desc, //备注
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				shipping_type: 1, //提货方式 1 快递 2自提
+				is_drop: this.isdrop//是否上门安装
+			};
+			// 判断是否拼团商品
+			if (obj.pinkid) {
+				data.pinkId = obj.pinkid;
+			}
+			// 生成订单
+			createOrderkey(data, obj.orderKey)
+				.then(({ data, status, msg }) => {
+					// 判断是否支付失败
+					if (data.status == 'ORDER_EXIST') {
+						uni.showModal({
+							title: '提示',
+							content: msg,
+							showCancel: false
+						});
+						uni.hideLoading();
+						obj.payLoding = false;
+						return;
+					}
+					// 保存订单号
+					obj.orderId = data.result.orderId;
+					// 判断是否为余额支付
+					if (obj.payName == 'yue') {
+						if (status == 200 && data.status == 'SUCCESS') {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					} else {
+						// 立即支付
+						obj.orderMoneyPay();
+					}
+				})
+				.catch(e => {
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.app {
+	width: 100%;
+}
+
+.price-box {
+	background-color: #fff;
+	height: 265upx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	font-size: 28upx;
+	color: #909399;
+
+	.price {
+		font-size: 50upx;
+		color: #303133;
+		margin-top: 12upx;
+		&:before {
+			content: '¥';
+			font-size: 40upx;
+		}
+	}
+}
+
+.pay-type-list {
+	margin-top: 20upx;
+	background-color: #fff;
+	padding-left: 60upx;
+	.type-item {
+		height: 120upx;
+		padding: 20upx 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding-right: 60upx;
+		font-size: 30upx;
+		position: relative;
+	}
+
+	.icon {
+		width: 100upx;
+		font-size: 52upx;
+	}
+	.iconyue {
+		color: #fe8e2e;
+	}
+	.iconweixin {
+		color: #36cb59;
+	}
+	.iconzhifubao {
+		color: #01aaef;
+	}
+	.tit {
+		font-size: $font-lg;
+		color: $font-color-dark;
+		margin-bottom: 4upx;
+	}
+	.con {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		font-size: $font-sm;
+		color: $font-color-light;
+	}
+}
+.mix-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 630upx;
+	height: 80upx;
+	margin: 80upx auto 30upx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10upx;
+	/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
+}
+
+.clickbg {
+	background-color: $color-gray !important;
+}
+</style>

+ 65 - 0
pages/money/paySuccess.vue

@@ -0,0 +1,65 @@
+<template>
+	<view class="content">
+		<text class="success-icon iconfont iconroundcheck"></text>
+		<text class="tit">支付成功</text>
+		<view class="btn-group">
+			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
+			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderId:''
+			}
+		},
+		onLoad(opt) {
+			// 保存订单号
+			this.orderId = opt.orderid;
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+	.success-icon{
+		font-size: 160upx;
+		color: #5dbc7c;
+		margin-top: 100upx;
+	}
+	.tit{
+		font-size: 38upx;
+		color: #303133;
+	}
+	.btn-group{
+		padding-top: 100upx;
+	}
+	.mix-btn {
+		margin-top: 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 600upx;
+		height: 80upx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10upx;
+		&.hollow{
+			background: #fff;
+			color: #303133;
+			border: 1px solid #ccc;
+		}
+	}
+</style>

+ 396 - 0
pages/money/recharge.vue

@@ -0,0 +1,396 @@
+<template>
+	<view class="content">
+		<view class="yue">
+			<view class="font">
+				当前余额
+			</view>
+			<view class="money">
+				{{ nowmoney | getMoneyStyle }}
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">充值金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
+			</view>
+			<view class="xian"></view>
+			<view class="moneyBtn-box">
+				<view class="moneyBtn" v-for="(item,index) in moneyList" :class="{'current' : choose == index}" :key="index" @click="changemoney(item,index)">
+					{{ item }}元
+				</view>
+			</view>
+		</view>
+
+		<view class="list">
+			<radio-group @change="tabRadio">
+				<!-- #ifndef APP-PLUS -->
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconweixin1"></view>
+						<view class="title-box">
+							<view class="title"><text>微信充值</text></view>
+							
+						</view>
+						<view class="right"><radio value="weixin" color="#FF4343" :checked="type == 'weixin'" /></view>
+					</view>
+				</label>
+				<!-- #endif -->
+				<!-- <label>
+					<view class="box">
+						<view class="icon iconfont"><image class="yongjing" src="http://xmpt.liuniu946.com/img/yongjing.png"></image></view>
+						<view class="title-box">
+							<view class="title"><text>佣金充值</text></view>
+							<view class="node">可用佣金¥{{ yongMoney }}</view>
+							
+						</view>
+						<view class="right"><radio value="yongjing" color=" #5dbc7c" :checked="type == 'yongjing'" /></view>
+					</view>
+				</label> -->
+				
+			</radio-group>
+		</view>
+		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
+	</view>
+</template>
+
+<script>
+	
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { userBalance,extractBank } from '@/api/wallet.js'
+// #ifdef H5
+import { rechargeWechat } from '@/api/wallet.js';
+// #endif
+// #ifdef MP
+import { rechargeRoutine } from '@/api/wallet.js';
+// #endif
+import { mapState } from 'vuex';
+// #ifdef H5
+
+import weixinObj from '@/plugin/jweixin-module/index.js';
+// #endif
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	data() {
+		return {
+			// #ifndef APP-PLUS
+			typeText: 0,
+			type: 'weixin',
+			// #endif
+			// #ifdef APP-PLUS
+			typeText: 1,
+			type: 'yongjing',
+			// #endif
+			money: '', //充值金额
+			payLoding: false, //是否加载中
+			moneyList: [300,200,150,100,50],
+			nowmoney: '',
+			choose: -1,
+			yongMoney:'',
+		};
+	},
+	onLoad(options) {
+		const obj = this;
+		if(options.type == '1'){
+			obj.type = 'yongjing',
+			obj.typeText = 1
+		}
+	},
+	onShow() {
+		userBalance({}).then(({ data }) => {
+			console.log(data)
+			this.nowmoney = data.now_money;
+		});
+		extractBank({}).then(({ data }) => {
+			this.yongMoney = (data.commissionCount*1).toFixed(2);//累积佣金
+		});
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj'])
+		// #endif
+	},
+	methods: {
+		// 跳转
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			console.log(e)
+			if ( e.detail.value == 'weixin' ) {
+				this.typeText = 0
+			} 
+			else {
+				this.typeText = 1
+			}
+			this.type = e;
+			console.log(this.typeText);
+		},
+		// 提交
+		confirm() {
+			let obj = this;
+			obj.payLoding = true;
+			if( obj.money == ''){
+				obj.$api.msg('请输入充值金额');
+				obj.payLoding = false;
+				return;
+			}
+			if( obj.type == 'yongjin' && obj.money > parseInt(obj.yongMoney) ) {
+				obj.$api.msg('佣金不足');
+				obj.payLoding = false;
+				return;
+			}
+			// #ifdef H5
+			// rechargeWechat({ price: this.money, from: this.type })
+			rechargeWechat({ price: this.money, from: 'weixin',
+			 type: this.typeText})
+				.then(e => {
+					console.log(e)
+					if ( obj.type == 'weixin' ){
+						let da = e.data.data;
+						console.log(weixinObj,"weixin")
+						weixinObj.chooseWXPay({
+							timestamp: da.timestamp,
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								
+								uni.showToast({
+									title: '充值成功',
+									duration: 2000,
+									position: 'top'
+								});
+								
+							}
+						});
+						obj.payLoding = false;
+					}else {
+						uni.navigateTo({
+							url: '/pages/money/rechargeSuccess'
+						})
+						obj.payLoding = false;
+						console.log(e, '佣金');
+					}
+				})
+				.catch(e => {
+					obj.payLoding = false;
+					console.log(e);
+				});
+			// #endif
+			// #ifdef MP
+			rechargeRoutine({ price: this.money})
+				.then(e => {
+					let da = e.data;
+						wx.requestPayment({
+								timeStamp: da.timestamp,
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									uni.redirectTo({
+										url: '/pages/money/paySuccess'
+									});
+								},
+								
+							})
+					
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					obj.payLoding = false;
+					console.log(e);
+				});
+			// #endif
+		},
+		//获取订单列表
+		loadData(source) {
+			console.log(source);
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			navItem.loadingType = 'loading';
+			setTimeout(() => {
+				let orderList = [];
+				orderList.forEach(item => {
+					navItem.orderList.push(item);
+				});
+				//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+				this.$set(navItem, 'loaded', true);
+				//判断是否还有数据, 有改为 more, 没有改为noMore
+				navItem.loadingType = 'more';
+			}, 600);
+		},
+		changemoney(item,index){
+			this.choose = index;
+			this.money = item
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+
+.add-btn {
+	&.modified {
+		color: $base-color;
+	}
+	&.up {
+		background: linear-gradient(-35deg, #FF4343, #FF4343);
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 604rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+.row-box {
+	margin-top: 30rpx;
+	padding: 20rpx 0rpx 20rpx 30rpx;
+	background: #fff;
+	.title {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		height: 80rpx;
+		.tit {
+			flex-shrink: 0;
+			width: 40rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+
+		.buttom {
+			color: $font-color;
+			font-size: $font-base;
+		}
+	}
+	.xian {
+		width: 700rpx;
+		height: 1rpx;
+		background: #E6E6E6;
+		margin-bottom: 16rpx;
+	}
+	.moneyBtn-box {
+		display: flex;
+		justify-content: flex-start;
+		flex-wrap: wrap;
+		.moneyBtn {
+			margin-right: 30rpx;
+			width: 210rpx;
+			height: 70rpx;
+			background: #F0F0F0;
+			border-radius: 4px;
+			margin-top: 30rpx;
+			text-align: center;
+			line-height: 70rpx;
+		}
+	}
+}
+.list {
+	padding-left: 30rpx;
+	margin-top: 30rpx;
+	background-color: #ffffff;
+	.box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 120rpx;
+		border-bottom: 1px solid $border-color-light;
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+		}
+		.yongjing {
+			width: 48rpx;
+			height: 48rpx;
+			
+		}
+		.iconweixin1 {
+			color: #18bf16;
+		}
+		.iconzhifubao {
+			color: #08aaec;
+		}
+		.title-box {
+			flex-grow: 1;
+			text-align: left;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-base;
+			}
+			.node {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+}
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+
+.active-bg {
+	background-color: $color-gray !important;
+}
+.yue {
+	display: flex;
+	justify-content: space-between;
+	padding: 30rpx 48rpx 30rpx 26rpx;
+	background: #FFFFFF;
+	.font{
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+	}
+	.money{
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #EF041F;
+	}
+}
+.current {
+	background: linear-gradient(-35deg, #F8DD4F, #FBEB77) !important;
+}
+</style>

+ 359 - 0
pages/money/wallet.vue

@@ -0,0 +1,359 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="money-box">
+				<image src="../../static/img/img33.png" mode=""></image>
+				<view class="money"><text class="money-icon">¥</text>{{ userInfo.now_money | getMoneyStyle }}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)" v-if="item.text!=='全部'">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{'height':maxheight+'px'}" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.title }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+						<view class="jg"></view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<view class="add-btn" @click="addmoney">立刻充值</view>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex';
+import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady() {
+		// 初始化获取页面宽度
+		uni.createSelectorQuery()
+			.select('.content')
+			.fields(
+				{
+					size: true
+				},
+				data => {
+					console.log(data);
+					console.log(Math.floor((data.width / 750) * 300));
+					// 保存头部高度
+					this.maxheight =data.height - Math.floor((data.width / 750) * 570);
+					console.log(this.maxheight);
+				}
+			)
+			.exec();
+	},
+	data() {
+		return {
+			// 头部图高度
+			maxheight:'',
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 2,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [
+					],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				
+			],
+			money: ''
+		};
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	onLoad(options) {},
+	onShow() {
+		this.loadData();
+		// 获取用户余额
+		
+	},
+	methods: {
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			spreadCommission(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					console.log(data);
+					// if (data.count > 0) {
+					// 	navItem.orderList = navItem.orderList.concat(data.list);
+					// 	console.log(navItem.orderList);
+					// 	navItem.page++;
+					// }
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data[0].list);
+						console.log(navItem.orderList);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+					
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		},
+		addmoney() {
+			uni.navigateTo({
+				url: '/pages/money/recharge'
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.content-money {
+	padding-bottom: 30rpx;
+	background: $page-color-base;
+	.moneyTx {
+		position: absolute;
+		top: 150rpx;
+		right: 0rpx;
+		width: 150rpx;
+		padding: 10rpx 30rpx;
+		border: 2px solid #ffffff;
+		border-top-left-radius: 99rpx;
+		border-bottom-left-radius: 99rpx;
+		color: #ffffff;
+		line-height: 1;
+		font-size: $font-base;
+	}
+	.buttom-box {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		padding: 20rpx 0;
+		border-radius: $border-radius-sm;
+		margin-top: -60rpx;
+		.buttom {
+			font-size: $font-lg;
+			flex-grow: 1;
+		}
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
+		.icon {
+			height: 50rpx;
+			width: 48rpx;
+			margin: 0 auto;
+			.icon-img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+}
+.money-box {
+	// background-color: $base-color;
+	// padding-top: var(--status-bar-height);
+	height: 400rpx;
+	color: #FF4C4C;
+	text-align: center;
+	position: relative;
+	image {
+		position: absolute;
+		top: 0;
+		right: 0;
+		height: 100%;
+		width: 100%;
+		// z-index: 1;
+	}
+	.text {
+		padding-top: 147rpx;
+		font-size: $font-sm;
+		position: relative;
+	}
+	.money {
+		padding-top: 175rpx;
+		// margin: auto 0;
+		font-size: 56rpx;
+		font-weight: bold;
+		color: #3F7C1F;
+		position: relative;
+		.money-icon {
+			font-size: 38rpx;
+			font-weight: bold;
+			color: #3F7C1F;
+		}
+	}
+}
+
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: #999999;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		position: relative;
+		// border-bottom: 1rpx black solid;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			// color: #fd5b23;
+			color: #901B21;
+			font-size: $font-lg;
+		}
+		.jg {
+			width: 701rpx;
+			height: 2rpx;
+			background: #F0F4F8;
+			margin: 0 auto;
+			position: absolute;
+			bottom: 0;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.add-btn {
+	position: fixed;
+	bottom: 51rpx;
+	right: 39rpx;
+	width: 674rpx;
+	height: 88rpx;
+	background: $base-color;
+	border-radius: 44rpx;
+	color: #fff;
+	text-align: center;
+	line-height: 88rpx;
+	font-size: 34rpx;
+}
+</style>

+ 312 - 0
pages/money/withdrawal.vue

@@ -0,0 +1,312 @@
+<template>
+	<view class="content">
+		<uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar>
+		<view class="content-money">
+			<view class="flex ">
+				<view class="buttom">
+					<view class="icon">{{ money | getMoneyStyle }}</view>
+					<text class="text">可提现金额</text>
+				</view>
+				<view class="interval"></view>
+				<view class="buttom">
+					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
+					<text class="text">待审核提现金额</text>
+				</view>
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">提现金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部提现</view>
+			</view>
+		</view>
+		<!-- #ifndef MP-WEIXIN -->
+		<view class="list" v-if="!weichatBsrowser">
+			<radio-group @change="tabRadio">
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconweixin1"></view>
+						<view class="title-box">
+							<view class="title"><text>提现至微信</text></view>
+						</view>
+						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconzhifubao"></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
+							</view>
+							<view class="node">
+								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-else>请创建银行账号</text>
+							</view>
+							<view class="node">
+								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
+					</view>
+				</label>
+			</radio-group>
+		</view>
+		<!-- #endif -->
+		<button class="add-btn up" @click="confirm">提交申请</button>
+		<button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button>
+	</view>
+</template>
+
+<script>
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
+import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	components: {
+		uniNoticeBar
+	},
+	data() {
+		return {
+			type: 'weixin', //提现方式
+			money: '0.00', //可提现金额
+			freeze: '0.0', //冻结金额
+			withdrawal: '', //提现金额
+			minPrice: '', //最少提现金额
+			aliData: {},
+			bankData: {},
+			// #ifdef H5
+			weichatBsrowser: false
+			// #endif
+		};
+	},
+	onLoad(options) {
+		// #ifdef H5
+		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+		// #endif
+		//加载提现信息
+		this.loadData();
+		// 加载提款账号信息
+		this.loadAli();
+		this.loadBank();
+	},
+	methods: {
+		// 更新数据
+		dataUp(){
+			this.loadAli();
+			this.loadBank();
+		},
+		//加载数据
+		async loadAli(source) {
+			aliInfo({}).then(e => {
+				this.aliData = e.data;
+			});
+		},
+		// 加载银行卡信息
+		async loadBank() {
+			bankInfo({}).then(e => {
+				this.bankData = e.data;
+			});
+		},
+		// 加载余额信息
+		async loadData() {
+			extractBank({}).then(({ data }) => {
+				this.money = data.moneyCount;//可提现余额
+				this.minPrice = data.minPrice;//最小提现
+				this.freeze =data.inmoneyCount//提现中的余额
+			});
+		},
+		// 跳转
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+		},
+		// 提交
+		confirm() {
+			let data = {
+				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
+				money: this.withdrawal, //金额
+				money_type: 1//0佣金1余额
+			}
+			if (this.type=='alipay') {
+				data.name = this.aliData.fullname;
+				data.alipay_code = this.aliData.alino;
+			}
+			if (this.type=='bank') {
+				data.name = this.bankData.fullname;
+				data.bankname = this.bankData.bank;
+				data.cardnum = this.bankData.bankno;
+			}
+			
+			
+			extractCash(data)
+				.then(e => {
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+				})
+				.catch(e => {
+					console.log();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.content-money {
+	padding: 30rpx 0;
+	background: #ffffff;
+}
+.flex {
+	background-color: #ffffff;
+	text-align: center;
+	margin: 0 30rpx;
+	border-radius: $border-radius-sm;
+	.buttom {
+		font-size: $font-lg;
+		width: 50%;
+	}
+	.interval {
+		width: 2px;
+		height: 60rpx;
+		background-color: #eeeeee;
+	}
+	.icon {
+		background-size: 100%;
+		font-size: 42rpx;
+		color: $font-color-dark;
+		font-weight: bold;
+		background-repeat: no-repeat;
+		background-position: center;
+	}
+	.text {
+		color: $font-color-light;
+	}
+}
+
+.row-box {
+	margin-top: 30rpx;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	.title {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		height: 80rpx;
+		.tit {
+			flex-shrink: 0;
+			width: 40rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+
+		.buttom {
+			color: $font-color-spec;
+			font-size: $font-base;
+		}
+	}
+}
+.add-btn {
+	&.modified {
+		color: $base-color;
+	}
+	&.up {
+		background-color: $base-color;
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.list {
+	padding-left: 30rpx;
+	margin-top: 30rpx;
+	background-color: #ffffff;
+	.box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 120rpx;
+		border-bottom: 1px solid $border-color-light;
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+			.icon-img {
+				height: 50rpx;
+				width: 50rpx;
+			}
+		}
+		.iconweixin1 {
+			color: #18bf16;
+		}
+		.iconzhifubao {
+			color: #08aaec;
+		}
+		.title-box {
+			flex-grow: 1;
+			text-align: left;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-base;
+			}
+			.node {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+}
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+</style>

ファイルの差分が大きいため隠しています
+ 169 - 0
pages/order/createOrder.vue


+ 411 - 0
pages/order/evaluate.vue

@@ -0,0 +1,411 @@
+<template>
+	<view class="content">
+		<view class="order-item">
+			<view class="goods-box-single">
+				<image class="goods-img" :src="productInfo.image" mode="aspectFill"></image>
+				<view class="right position-relative">
+					<view class="flex">
+						<text class="title">{{ productInfo.store_name }}</text>
+						<view class="title-right">
+							<view class="price">{{ productInfo.price }}</view>
+							<view class="attr-box">x{{ list.cart_num }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view>
+				<view class="flex_item zhil">
+					<view>商品质量</view>
+					<view><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
+				</view>
+				<view class="flex_item zhil">
+					<view>服务态度</view>
+					<view><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
+				</view>
+				<view class="equity_box">
+					<view class="text-box uni-textarea">
+						<textarea placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea>
+					</view>
+					<view class="">
+						<view class="add-img-box flex_item">
+							<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
+								<image class="add-img" @click.stop="imgInfo(index)" :src="item.url" mode="aspectFill"></image>
+								<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
+							</view>
+							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()">
+								<image class="add-img" src="/static/img/add.png"></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view @click.stop="submit" class="address-box submit-box"><text class="submit-btn">提交评论</text></view>
+	</view>
+</template>
+
+<script>
+import { product, upload, order_comment } from '@/api/order.js';
+import uniRate from '@/components/uni-rate/uni-rate.vue';
+export default {
+	components: {
+		uniRate
+	},
+	data() {
+		return {
+			list: '', //订单详情
+			productInfo: '',
+			text: '', //评论内容
+			placeholder: '商品满足你的期待么?说说你的想法,分享给想买的他们吧~',
+			imgList: [],
+			unique: '', //商品唯一标识码
+			cloudimgList: [],
+			rateValue1: '', //商品质量
+			rateValue2: '', //服务态度
+			imgCount: 6 //最多支持9张上传,可以修改
+		};
+	},
+	onLoad(option) {
+		this.unique = option.unique;
+		this.loadOrder();
+	},
+	onShow() {},
+	methods: {
+		//text
+		bindTextAreaBlur: function(e) {
+			this.text = e.detail.value;
+		},
+		//获取收入支出信息
+		async loadOrder() {
+			product({
+				unique: this.unique
+			}).then(e => {
+				this.list = e.data;
+				this.productInfo = e.data.productInfo;
+			});
+		},
+		//商品质量评分
+		rateChange1(val) {
+			this.rateValue1 = val.value;
+		},
+		//服务态度评分
+		rateChange2(val) {
+			this.rateValue2 = val.value;
+		},
+		//单张上传图片
+		scImg() {
+			let obj = this;
+			console.log(obj.imgCount, 11);
+			if (obj.imgCount == 0) {
+				uni.showToast({
+					title: '最多添加6张图片',
+					icon: 'none'
+				});
+				return;
+			}
+			upload({
+				file: ''
+			})
+				.then(e => {
+					console.log(e,'e')
+					obj.imgList = [...obj.imgList, ...e];
+					console.log(obj.imgList,'imgList')
+					obj.imgCount = 10 - obj.imgList.length;
+					console.log(obj.imgCount ,'imgCount ')
+				})
+				.catch(e => {});
+		},
+		//提交评论
+		submit(e) {
+			let obj = this;
+			if (obj.imgList.length < 1) {
+				uni.showToast({
+					title: '请添加图片',
+					icon: 'none'
+				});
+				return;
+			}
+			for (let i = 0; i < obj.imgList.length; i++) {
+				obj.cloudimgList.push(obj.imgList[i].url);
+			}
+			let arr = obj.cloudimgList.join(',');
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			})
+			order_comment({
+				pics: arr,
+				comment: obj.text,
+				product_score: obj.rateValue1,
+				service_score: obj.rateValue2,
+				unique: obj.unique,
+				
+			})
+				.then(e => {
+					uni.hideLoading()
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				})
+				.catch(e => {
+					uni.hideLoading()
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				});
+		},
+		//点击图片显示大图
+		imgInfo(i) {
+			let tempList = [];
+			console.log(111);
+			this.imgList.forEach(e => {
+				tempList.push(e.url);
+			});
+			console.log(tempList);
+			//显示图片
+			uni.previewImage({
+				current: i,
+				loop: false,
+				urls: tempList,
+				indicator: 'default'
+			});
+		},
+		//删除图片
+		delImg(i) {
+			uni.showModal({
+				content: '确定删除这张吗',
+				success: res => {
+					if (res.confirm) {
+						this.imgList.splice(i, 1);
+						this.imgCount++;
+					} else if (res.cancel) {
+					}
+				}
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+	.content {
+		background: #ffffff;
+		height: 100%;
+	}
+}
+/* 多条商品 */
+.order-item {
+	display: flex;
+	flex-direction: column;
+	padding: 0rpx 30rpx;
+	background: #fff;
+	margin-top: 20rpx;
+	/* 单条商品 */
+	.goods-box-single {
+		display: flex;
+		padding: 20rpx 0;
+		.goods-img {
+			display: block;
+			width: 120rpx;
+			height: 120rpx;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			padding: 0 30rpx 0 24rpx;
+			overflow: hidden;
+			height: 100%;
+			.title {
+				align-self: flex-start;
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 80rpx;
+				overflow:hidden; 
+				text-overflow:ellipsis;
+				display:-webkit-box; 
+				-webkit-box-orient:vertical;
+				-webkit-line-clamp:2; 
+			}
+			.title-right {
+				flex-shrink: 0;
+				text-align: right;
+				align-self: flex-start;
+			}
+			.attr-box {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+			}
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+	}
+}
+.equity_box {
+	background-color: #fafafa;
+	border-radius: 10rpx;
+	padding: 25rpx 25rpx;
+	margin: 25rpx 0rpx;
+	.text-box {
+		height: 200rpx;
+		textarea {
+			font-size: 25rpx;
+			width: 100%;
+			height: 100%;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 5;
+		}
+	}
+}
+.zhil {
+	font-size: 28rpx !important;
+	padding: 15rpx 15rpx;
+}
+.submit-box {
+	bottom: 0;
+	left: 0;
+	width: 750rpx;
+}
+.submit-btn {
+	margin-top: 10px;
+	display: inline-block;
+	width: 670rpx;
+	height: 96rpx;
+	line-height: 96rpx;
+	text-align: center;
+	background-color: #fd4040 !important;
+	opacity: 1;
+	border-radius: 32rpx;
+	border-width: 8rpx;
+	border-color: rgba(255, 255, 255, 1);
+	box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
+	border-radius: 56rpx;
+	font-size: 39rpx;
+	font-weight: bold;
+	color: rgba(255, 255, 255, 1);
+}
+.submit-btn-txt {
+	font-size: 39rpx;
+	font-weight: bold;
+	line-height: 47rpx;
+	color: rgba(255, 255, 255, 1);
+	opacity: 1;
+}
+.map-box {
+	width: 484rpx;
+	height: 256rpx;
+	border-width: 4rpx;
+	border-color: rgba(255, 255, 255, 1);
+	box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.16);
+	/* border-radius: 12rpx; */
+	position: relative;
+}
+.map {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	width: 476rpx;
+	height: 250rpx;
+}
+.map-img {
+	position: absolute;
+	top: 90rpx;
+	left: 156rpx;
+	width: 230rpx;
+	height: 68rpx;
+	background-color: rgba(51, 51, 51, 0.64);
+	border-width: 1rpx;
+	border-color: rgba(0, 0, 0, 0);
+	border-radius: 34px;
+
+	font-size: 28rpx;
+	font-weight: bold;
+	line-height: 66rpx;
+	color: rgba(255, 255, 255, 1);
+	text-align: center;
+}
+.address-box {
+	padding: 15rpx 40rpx;
+	margin-bottom: 10px;
+}
+.label {
+	font-size: 36rpx;
+	font-weight: bold;
+	line-height: 50rpx;
+	color: #222222;
+}
+.label-img {
+	padding-left: 40rpx;
+}
+
+.add-img-box {
+	width: 100%;
+	flex-direction: row;
+	flex-wrap: wrap;
+	margin-top: 50rpx;
+}
+.add-img-item {
+	width: 180rpx;
+	height: 180rpx;
+	border-radius: 24rpx;
+	position: relative;
+	margin: 0rpx 20rpx;
+	margin-bottom: 25rpx;
+	.add-img {
+		width: 100%;
+		height: 100%;
+		border-radius: 24rpx;
+	}
+}
+.add-img-camera {
+	flex: 1;
+}
+.add-img-del {
+	position: absolute;
+	width: 40rpx;
+	height: 40rpx;
+	left: 155rpx;
+	bottom: 155rpx;
+	//background-color: rgba(238, 0, 0, 1);
+	border-radius: 20rpx;
+}
+.address-time {
+	width: 484rpx;
+	height: 88rpx;
+	background-color: rgba(245, 245, 245, 1);
+	opacity: 1;
+	border-radius: 24rpx;
+	text-align: center;
+
+	font-size: 35rpx;
+	font-weight: 500;
+	color: rgba(51, 51, 51, 1);
+}
+.line {
+	width: 750rpx;
+	height: 1px;
+	transform: scaleY(0.3);
+	background-color: rgba(0, 0, 0, 0.5);
+}
+</style>

+ 74 - 0
pages/order/expressInfo.vue

@@ -0,0 +1,74 @@
+<template>
+	<view class="container">
+		<view class="express-box">
+			<view class="top-text">
+				<text class="top-com">{{expressList.com}}</text>
+				<text>{{ expressList.nu }}</text>
+			</view>
+			<view class="express-body">
+				<uni-steps :options="expressList.data" active-color="#007AFF" :active="active" direction="column"></uni-steps>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { express_query } from '@/api/order.js';
+import uniSteps from '@/components/uni-steps/uni-steps.vue';
+export default {
+	components: {
+		uniSteps
+	},
+	data() {
+		return {
+			id: '',
+			expressList: [],
+			active: 0
+		}
+	},
+	onLoad(option) {
+		this.id = option.id
+	},
+	onShow() {
+		this.loadData()
+	},
+	methods: {
+		loadData() {
+			express_query({
+				id: this.id,
+			}).then(({data}) => {
+				this.expressList = data;
+				console.log(this.expressList)
+			})
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.container {
+	padding: 40rpx;
+	.express-box {
+		border-radius: $border-radius-sm;
+		.top-text {
+			width: 100%;
+			height: 60rpx;
+			background: #FFFFFF;
+			padding-left: 20rpx;
+			font-size: $font-base;
+			border-radius: $border-radius-sm;
+			display: flex;
+			align-items: center;
+			.top-com {
+				margin-right: 10rpx;
+			}
+		}
+		.express-body {
+			margin-top: 20rpx;
+			background: #FFFFFF;
+			border-radius: $border-radius-sm;
+			padding: 20rpx 10rpx 20rpx 0;
+		}
+	}
+}
+</style>

+ 677 - 0
pages/order/order.vue

@@ -0,0 +1,677 @@
+<template>
+	<view class="content">
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
+						<view class="i-top b-b">
+							<text class="time">订单编号:{{ item.order_id }}</text>
+							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
+							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
+						</view>
+
+						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							</view>
+						</scroll-view>
+						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							<view class="right">
+								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
+								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
+							</view>
+						</view> -->
+						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
+							<view class="right">
+								<view class="flex-start" style="justify-content: space-between;">
+									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+									<text class="price">{{ moneyNum(goodsItem.truePrice) }}</text>
+								</view>
+								<view class="row flex">
+									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
+									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
+								</view>
+							</view>
+						</view>
+
+						<view class="price-box">
+							共
+							<text class="num">{{ item.cartInfo.length }}</text>
+							件商品 合计
+							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+							(含邮费
+							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							)
+						</view>
+						<view class="action-box b-t" v-if="item.status != 5">
+							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
+							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">付款</button>
+							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
+							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
+							<!-- <button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
+						</view>
+					</view>
+
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
+export default {
+	components: {
+		uniLoadMore,
+		empty
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '待付款',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 2,
+					text: '待发货',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 3,
+					text: '待收货',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 4,
+					text: '已完成',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		/**
+		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+		 * 替换onLoad下代码即可
+		 */
+		this.tabCurrentIndex = +options.state;
+		// #ifndef MP
+		this.loadData();
+		// #endif
+		// #ifdef MP
+		if (options.state == 0) {
+			this.loadData();
+		}
+		// #endif
+	},
+	// #ifdef APP-PLUS || H5
+	onBackPress(e){
+		uni.switchTab({
+			url: '/pages/user/user',
+		});
+		return true;
+	},
+	// #endif
+	methods: {
+		// 转换金额为数字
+		moneyNum(value){
+				return +value;
+		},
+		// 确认收货
+		orderTake(item, index) {
+			let obj = this;
+			uni.showModal({
+				title: '是否确认收货?',
+				success: () => {
+					orderTake({
+						uni: item.order_id
+					})
+						.then(e => {
+							obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
+							uni.showToast({
+								title: '收货成功'
+							});
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				}
+			});
+		},
+		//跳转到订单详情
+		goToOrderDetail(e) {
+			uni.navigateTo({
+				url: '/pages/order/orderDetail?id=' + e.order_id
+			});
+		},
+		// 申请退款
+		orderRefund(e) {
+			uni.navigateTo({
+				url: '/pages/order/orderRefund?id=' + e.order_id
+			});
+		},
+		// 订单支付
+		orderPay(e) {
+			uni.navigateTo({
+				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
+			});
+		},
+		//获取订单列表
+		loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			if (navItem.loadingType === 'noMore') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			orderList({
+				type: state,
+				page: navItem.page,
+				limit: navItem.limit
+			})
+				.then(({ data }) => {
+					let arr = data.map(e => {
+						let b = this.orderStateExp(e.status);
+						e.stateTip = b.stateTip;
+						e.stateTipColor = b.stateTipColor;
+						return e;
+					});
+					navItem.orderList = navItem.orderList.concat(arr);
+					// console.log(navItem.orderList);
+					navItem.page++;
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		},
+		//删除订单
+		deleteOrder(index) {
+			uni.showLoading({
+				title: '请稍后'
+			});
+			setTimeout(() => {
+				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
+				uni.hideLoading();
+			}, 600);
+		},
+		//取消订单
+		cancelOrder(item) {
+			uni.showModal({
+				title: '订单取消',
+				content: '是否取消订单?',
+				success: e => {
+					if (e.confirm) {
+						uni.showLoading({
+							title: '请稍后'
+						});
+						orderCancel({ id: item.order_id })
+							.then(e => {
+								uni.showToast({
+									title: '取消成功',
+									duration: 2000,
+									position: 'top'
+								});
+							})
+							.catch(e => {
+								console.log(e);
+							});
+						//取消订单后删除待付款中该项
+						let list = this.navList[this.tabCurrentIndex].orderList;
+						let index = list.findIndex(val => val.id === item.id);
+						index !== -1 && list.splice(index, 1);
+						uni.hideLoading();
+					}
+				}
+			});
+		},
+
+		//订单状态文字和颜色
+		orderStateExp(state) {
+			let stateTip = '',
+				stateTipColor = '#fa436a';
+			switch (+state) {
+				case 0:
+					stateTip = '全部';
+					break;
+				case 1:
+					stateTip = '待付款';
+					break;
+				case 2:
+					stateTip = '待发货';
+					break;
+				case 3:
+					stateTip = '待收货';
+					break;
+				case 4:
+					stateTip = '已完成';
+					stateTipColor = '#909399';
+					break;
+				case 9:
+					stateTip = '订单已关闭';
+					stateTipColor = '#909399';
+					break;
+
+				//更多自定义
+			}
+			return { stateTip, stateTipColor };
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+
+.swiper-box {
+	height: calc(100% - 40px);
+}
+.list-scroll-content {
+	height: 100%;
+}
+
+.navbar {
+	display: flex;
+	height: 40px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		margin-top: 80rpx;
+		background-color: #fff;
+		border-top: 1rpx solid #F8F6F6;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+
+.uni-swiper-item {
+	height: auto;
+}
+.order-item {
+	display: flex;
+	flex-direction: column;
+	padding-left: 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.i-top {
+		display: flex;
+		align-items: center;
+		height: 80rpx;
+		padding-right: 30rpx;
+		font-size: $font-base;
+		color: $font-color-dark;
+		position: relative;
+		.time {
+			flex: 1;
+		}
+		.state {
+			color: $base-color;
+		}
+		.del-btn {
+			padding: 10rpx 0 10rpx 36rpx;
+			font-size: $font-lg;
+			color: $font-color-light;
+			position: relative;
+			&:after {
+				content: '';
+				width: 0;
+				height: 30rpx;
+				border-left: 1px solid $border-color-dark;
+				position: absolute;
+				left: 20rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+	}
+	/* 多条商品 */
+	.goods-box {
+		height: 160rpx;
+		padding: 20rpx 0;
+		white-space: nowrap;
+		.goods-item {
+			width: 120rpx;
+			height: 120rpx;
+			display: inline-block;
+			margin-right: 24rpx;
+		}
+		.goods-img {
+			display: block;
+			width: 100%;
+			height: 100%;
+		}
+	}
+	/* 单条商品 */
+	.goods-box-single {
+		display: flex;
+		padding: 20rpx 0;
+		.goods-img {
+			display: block;
+			width: 120rpx;
+			height: 120rpx;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			padding: 0 30rpx 0 24rpx;
+			overflow: hidden;
+			.row{
+				margin-top: 10rpx;
+			}
+			.row_title{
+				padding:5rpx 10rpx;
+				background-color: #dddddd;
+				border-radius: 10rpx;
+				font-size: 22rpx;
+				color: #ffffff;
+			}
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				line-height: 1;
+				width: 80%;
+			}
+			.attr-box {
+				display: flex;
+				justify-content: flex-end;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+			}
+			.price {
+				display: inline;
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					
+				}
+			}
+		}
+	}
+	.price-box {
+		display: flex;
+		justify-content: flex-end;
+		align-items: baseline;
+		padding: 20rpx 30rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-light;
+		.num {
+			margin: 0 8rpx;
+			color: $font-color-dark;
+		}
+		.price {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			&:before {
+				content: '¥';
+				font-size: $font-sm;
+				margin: 0 2rpx 0 8rpx;
+			}
+		}
+	}
+	.action-box {
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		height: 100rpx;
+		position: relative;
+		padding-right: 30rpx;
+	}
+	.action-btn {
+		width: 160rpx;
+		height: 60rpx;
+		margin: 0;
+		margin-left: 24rpx;
+		padding: 0;
+		text-align: center;
+		line-height: 60rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-dark;
+		background: #fff;
+		border-radius: 100px;
+		&:after {
+			border-radius: 100px;
+		}
+		&.recom {
+			color: $base-color;
+			&:after {
+				border-color: $base-color;
+			}
+		}
+		&.evaluate {
+			color: $color-yellow;
+			&:after {
+				border-color: $color-yellow;
+			}
+		}
+	}
+}
+
+/* load-more */
+.uni-load-more {
+	display: flex;
+	flex-direction: row;
+	height: 80rpx;
+	align-items: center;
+	justify-content: center;
+}
+
+.uni-load-more__text {
+	font-size: 28rpx;
+	color: #999;
+}
+
+.uni-load-more__img {
+	height: 24px;
+	width: 24px;
+	margin-right: 10px;
+}
+
+.uni-load-more__img > view {
+	position: absolute;
+}
+
+.uni-load-more__img > view view {
+	width: 6px;
+	height: 2px;
+	border-top-left-radius: 1px;
+	border-bottom-left-radius: 1px;
+	background: #999;
+	position: absolute;
+	opacity: 0.2;
+	transform-origin: 50%;
+	animation: load 1.56s ease infinite;
+}
+
+.uni-load-more__img > view view:nth-child(1) {
+	transform: rotate(90deg);
+	top: 2px;
+	left: 9px;
+}
+
+.uni-load-more__img > view view:nth-child(2) {
+	transform: rotate(180deg);
+	top: 11px;
+	right: 0;
+}
+
+.uni-load-more__img > view view:nth-child(3) {
+	transform: rotate(270deg);
+	bottom: 2px;
+	left: 9px;
+}
+
+.uni-load-more__img > view view:nth-child(4) {
+	top: 11px;
+	left: 0;
+}
+
+.load1,
+.load2,
+.load3 {
+	height: 24px;
+	width: 24px;
+}
+
+.load2 {
+	transform: rotate(30deg);
+}
+
+.load3 {
+	transform: rotate(60deg);
+}
+
+.load1 view:nth-child(1) {
+	animation-delay: 0s;
+}
+
+.load2 view:nth-child(1) {
+	animation-delay: 0.13s;
+}
+
+.load3 view:nth-child(1) {
+	animation-delay: 0.26s;
+}
+
+.load1 view:nth-child(2) {
+	animation-delay: 0.39s;
+}
+
+.load2 view:nth-child(2) {
+	animation-delay: 0.52s;
+}
+
+.load3 view:nth-child(2) {
+	animation-delay: 0.65s;
+}
+
+.load1 view:nth-child(3) {
+	animation-delay: 0.78s;
+}
+
+.load2 view:nth-child(3) {
+	animation-delay: 0.91s;
+}
+
+.load3 view:nth-child(3) {
+	animation-delay: 1.04s;
+}
+
+.load1 view:nth-child(4) {
+	animation-delay: 1.17s;
+}
+
+.load2 view:nth-child(4) {
+	animation-delay: 1.3s;
+}
+
+.load3 view:nth-child(4) {
+	animation-delay: 1.43s;
+}
+
+@-webkit-keyframes load {
+	0% {
+		opacity: 1;
+	}
+
+	100% {
+		opacity: 0.2;
+	}
+}
+</style>

ファイルの差分が大きいため隠しています
+ 184 - 0
pages/order/orderDetail.vue


+ 246 - 0
pages/order/orderRefund.vue

@@ -0,0 +1,246 @@
+<template>
+	<view class="content">
+		<view class="order-item">
+			<scroll-view v-if="listStyle == 1" class="goods-box" scroll-x>
+				<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+					<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+				</view>
+			</scroll-view>
+			<view v-if="listStyle == 2" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+				<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+				<view class="right">
+					<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+					<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
+					<text class="price">{{ goodsItem.productInfo.price }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="orderDetial">
+			<view class="row b-b flex">
+				<text class="tit">订单总价</text>
+				<view class="input">¥{{ item.total_price }}</view>
+			</view>
+			<view class="row b-b flex">
+				<text class="tit">邮费</text>
+				<view class="input">{{ item.pay_postage > 0 ? '¥' +item.pay_postage : '免邮费' }}</view>
+			</view>
+			<view class="row b-b flex" v-if="item.coupon_id > 0">
+				<text class="tit">优惠券</text>
+				<view class="input">-¥{{ item.coupon_price }}</view>
+			</view>
+			<view class="row b-b flex" v-if="item.use_integral > 0">
+				<text class="tit">积分抵扣</text>
+				<view class="input">-¥{{ item.use_integral }}</view>
+			</view>
+			<view class="row b-b flex">
+				<text class="tit ">实付</text>
+				<view class="input payColor">¥{{ item.pay_price }}</view>
+			</view>
+		</view>
+		<view class="row b-b">
+			<text class="tit">退款理由</text>
+			<picker mode="selector" :range="value" @change="bindChange">
+				<view class="refund" v-if="refund">{{ refund || '请选择退款理由' }}</view>
+				<view class="noRefund" v-else>请选择退款理由</view>
+			</picker>
+		</view>
+		<view class="row b-b">
+			<text class="tit">备注说明</text>
+			<input class="input" type="text" v-model="reason" placeholder="请填写备注" placeholder-class="placeholder" />
+		</view>
+		<button class="add-btn" @click="confirm">提交</button>
+	</view>
+</template>
+
+<script>
+import { refund, refundReason, orderDetail } from '@/api/order.js';
+export default {
+	data() {
+		return {
+			refund: '', //退款理由
+			reason: '', //备注
+			value: ['1', '2', '3', '4', '5', '6', '7', '8', 9, 10, 11, 12, 13],
+			orderId: '',
+			item: {},
+			listStyle: 2
+		};
+	},
+	onLoad(option) {
+		this.orderId = option.id;
+		this.refundReason();
+		this.loadOrder();
+	},
+	methods: {
+		// 切换选中事件
+		bindChange(e) {
+			this.refund = this.value[e.detail.value];
+		},
+		// 加载退款理由
+		refundReason() {
+			refundReason({}).then(e => {
+				this.value = e.data;
+			});
+		},
+		loadOrder() {
+			orderDetail({}, this.orderId).then(e => {
+				this.item = e.data;
+			});
+		},
+		//提交
+		confirm() {
+			let obj = this;
+			if (!obj.refund) {
+				uni.showModal({
+					title: '错误',
+					content: '请填写退货理由',
+					showCancel: false
+				});
+				return false;
+			}
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			})
+			refund({
+				text: obj.refund,
+				uni: obj.orderId,
+				refund_reason_wap_explain: obj.reason
+			}).then(function(e) {
+				uni.hideLoading()
+				uni.showToast({
+					title:'提交成功',
+					duration:1500
+				})
+			}).catch( err => {
+				uni.hideLoading()
+				console.log(err)
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+	padding-top: 16rpx;
+}
+.orderDetial {
+	.row {
+		.input {
+			text-align: right;
+		}
+	}
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+	.refund {
+		font-size: 30rpx;
+		color: $font-color-dark;
+		padding-left: 20rpx;
+	}
+	.noRefund {
+		font-size: 30rpx;
+		color: $font-color-light;
+		padding-left: 20rpx;
+	}
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		padding-left: 20rpx;
+		&.payColor {
+			color: $color-red;
+		}
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+/* 多条商品 */
+.order-item {
+	display: flex;
+	flex-direction: column;
+	padding-left: 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.goods-box {
+		height: 160rpx;
+		padding: 20rpx 0;
+		white-space: nowrap;
+		.goods-item {
+			width: 120rpx;
+			height: 120rpx;
+			display: inline-block;
+			margin-right: 24rpx;
+		}
+		.goods-img {
+			display: block;
+			width: 100%;
+			height: 100%;
+		}
+	}
+	/* 单条商品 */
+	.goods-box-single {
+		display: flex;
+		padding: 20rpx 0;
+		.goods-img {
+			display: block;
+			width: 120rpx;
+			height: 120rpx;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			padding: 0 30rpx 0 24rpx;
+			overflow: hidden;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				line-height: 1;
+			}
+			.attr-box {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+				padding: 10rpx 12rpx;
+			}
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 68 - 0
pages/product/common/contentText.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="detail-desc">
+		<view class="d-header"><text>图文详情</text></view>
+		<rich-text class="detail-centent" :nodes="description"></rich-text>
+		<!-- 底部高度撑开 -->
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		description: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+			
+		};
+	},
+};
+</script>
+
+<style lang="scss">
+	/*  详情 */
+	.detail-desc {
+		margin-top: 14rpx;
+		background: #fff;
+		/deep/ img {
+			max-width: 100% !important;
+			display: inline !important;
+		}
+		/deep/ div {
+			max-width: 100% !important;
+		}
+		.d-header {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 80rpx;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			position: relative;
+	
+			text {
+				padding: 0 20rpx;
+				background: #fff;
+				position: relative;
+				z-index: 1;
+			}
+			&:after {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translateX(-50%);
+				width: 300rpx;
+				height: 0;
+				content: '';
+				border-bottom: 1px solid #ccc;
+			}
+		}
+	}
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 139 - 0
pages/product/common/discounts.vue

@@ -0,0 +1,139 @@
+<template>
+	<view class="c-list">
+		<view class="c-row b-b">
+			<text class="tit">配送</text>
+			<view class="bz-list con" v-if="!mark">立即下单 ,预计最快第二天8.30-9:30送达</view>
+			<view class="bz-list con reding" v-else>{{mark}}</view>
+		</view>
+		<view v-if="showCoupon" class="c-row b-b" @click="Getcoupon">
+			<text class="tit">优惠券</text>
+			<text class="con t-r red">领取优惠券</text>
+			<text class="iconfont iconenter"></text>
+		</view>
+		<view class="c-row b-b">
+			<text class="tit">简介</text>
+			<view class="bz-list con">
+				<text>{{ Info }}</text>
+				<!-- <text>{{ copy2 }}</text> -->
+
+			</view>
+			<view class="copy-btn" @click="copy">一键复制</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			showCoupon: {
+				type: Boolean,
+				default: false
+			},
+			mark: {
+				default: ''
+			},
+			Info: {
+				default: ''
+			},
+		},
+		data() {
+			return {
+				copy1: '食材质检 ·',
+				copy2: '无接触配送到门口'
+			};
+		},
+		methods: {
+			Getcoupon() {
+				this.$emit('clickCoupon')
+			},
+			copy() {
+				// let copyText = this.copy1 + ' ' + this.copy2;
+				console.log(this.Info)
+				uni.setClipboardData({
+					//去找上面的数据
+					data: this.Info,
+					success: function(res) {
+						uni.showToast({
+							title: '复制成功',
+						});
+					},
+					fail: function(res) {
+					}
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.c-list {
+		font-size: $font-sm + 2rpx;
+		color: $font-color-base;
+		background: #fff;
+
+		.title {
+			color: #333333;
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+
+		.c-row {
+			display: flex;
+			align-items: center;
+			padding: 20rpx 30rpx;
+			position: relative;
+		}
+
+		.tit {
+			width: 140rpx;
+		}
+
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+
+		.reding {
+			color: #FF0815 !important;
+		}
+
+		.bz-list {
+			height: 40rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			
+			text {
+				display: inline-block;
+				margin-right: 30rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				width: 100%;
+			}
+		}
+
+		.copy-btn {
+			background-color: #F3F3F2;
+			padding: 8rpx 20rpx;
+			border-radius: 10rpx;
+			color: #040406;
+		}
+
+		.red {
+			color: #fb6d24;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	.rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 115 - 0
pages/product/common/estimate.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="eva-section" @click="navTo">
+		<view class="e-header">
+			<text class="tit">评价</text>
+			<text>({{ list.replyCount }})</text>
+			<text class="tip">好评率 {{ list.replyChance }}%</text>
+			<text class="iconfont iconenter"></text>
+		</view>
+		<view class="eva-box">
+			<image class="portrait" :src="reply.avatar" mode="aspectFill"></image>
+			<view class="right">
+				<text class="name">{{ reply.nickname }}</text>
+				<text class="con">{{ reply.comment }}</text>
+				<view class="con_box">
+					<view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
+				</view>
+				<view class="bot">
+					<text class="attr"></text>
+					<text class="stime">{{ reply.add_time }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		list: {
+			default: ''
+		},
+		reply: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+		};
+	},
+	methods: {
+		navTo() {
+			this.$emit('navTo')
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+/* 评价 */
+.eva-section {
+	display: flex;
+	flex-direction: column;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.e-header {
+		display: flex;
+		align-items: center;
+		height: 70rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-light;
+		.tit {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right: 4rpx;
+		}
+		.tip {
+			flex: 1;
+			text-align: right;
+		}
+		.iconenter {
+			margin-left: 10rpx;
+		}
+	}
+	.eva-box {
+		display: flex;
+		padding: 20rpx 0;
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base;
+			color: $font-color-base;
+			padding-left: 26rpx;
+			.con {
+				font-size: $font-base;
+				color: $font-color-dark;
+				padding: 20rpx 0;
+			}
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+	.con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 85 - 0
pages/product/common/freshDetail.vue

@@ -0,0 +1,85 @@
+<template>
+	<view class="c-list" v-if="goodsObjact.net_quantity||goodsObjact.storage_condition||goodsObjact.expiration_date">
+		<view class="c-row title b-b">规格</view>
+		<view class="c-row b-b" v-if="goodsObjact.net_quantity">
+			<text class="tit">净含量</text>
+			<text class="con t-r">{{ goodsObjact.net_quantity }}</text>
+		</view>
+		<view class="c-row b-b" v-if="goodsObjact.storage_condition">
+			<text class="tit">保存条件</text>
+			<text class="con t-r">{{ goodsObjact.storage_condition }}</text>
+		</view>
+		<view class="c-row b-b" v-if="goodsObjact.expiration_date">
+			<text class="tit">保质期</text>
+			<text class="con t-r">{{ goodsObjact.expiration_date }}</text>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		goodsObjact: {
+			type: Object,
+			default: function () {
+				return {
+					
+				}
+			}
+		},
+	},
+	data() {
+		return {
+			
+		};
+	},
+};
+</script>
+
+<style lang="scss">
+.c-list {
+	font-size: $font-sm + 2rpx;
+	color: $font-color-base;
+	background: #fff;
+	.title {
+		color: #333333;
+		font-size: 32rpx;
+		font-weight: bold;
+	}
+	.c-row {
+		display: flex;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		position: relative;
+	}
+	.tit {
+		width: 140rpx;
+	}
+	.con {
+		flex: 1;
+		color: $font-color-dark;
+		.selected-text {
+			margin-right: 10rpx;
+		}
+	}
+	.bz-list {
+		height: 40rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-dark;
+		text {
+			display: inline-block;
+			margin-right: 30rpx;
+		}
+	}
+	.con-list {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		color: $font-color-dark;
+		line-height: 40rpx;
+	}
+	.red {
+		color: #fb6d24;
+	}
+}
+</style>

+ 120 - 0
pages/product/common/guessLike.vue

@@ -0,0 +1,120 @@
+<template>
+	<view class="guess-item">
+		<view class="guess">猜你喜欢</view>
+		<view class="guess-scroll flex_item" scroll-x>
+			<view class="scroll-list" v-for="ls in goodList" @click="navToDetailPage(ls)">
+				<view class="scoll-img"><image :src="ls.image"></image></view>
+				<view class="scoll-name ellipsis">{{ ls.store_name }}</view>
+				<view class="price-list flex">
+					<view class="tpl">
+						<view class="red-price">
+							¥
+							<text>{{ ls.price }}</text>
+						</view>
+						<view class="grey-price">¥{{ ls.ot_price }}</view>
+					</view>
+					<view class="img position-relative" @click.stop="Addcar(ls)">
+						<image src="/static/img/img13.png"></image>
+						<view class="corner" v-if="ls.cart_num > 0">
+							<text>{{ ls.cart_num }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		goodList: {
+			type: Array,
+			default: function () {
+				return []
+			}
+		},
+	},
+	methods: {
+		// 跳转到详情页
+		navToDetailPage(ls){
+			this.$emit('clickNavTo',ls)
+		},
+		// 加入购物车
+		Addcar(ls){
+			this.$emit('Addcar',ls)
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+//猜你喜欢
+.guess-item {
+	padding: 25rpx 25rpx;
+	background: #ffffff;
+	margin-bottom: 15rpx;
+	padding-bottom: 45rpx !important;
+	.guess {
+		color: #000000;
+		font-size: 35rpx;
+		font-weight: 500;
+		padding-bottom: 25rpx;
+	}
+	.guess-scroll {
+		width: 100%;
+		font-size: 24rpx;
+		overflow: hidden;
+		overflow-x: auto;
+		justify-content: flex-start;
+		.scroll-list {
+			border: 2rpx solid #f0f0f0;
+			border-radius: 25rpx;
+			margin-right: 15rpx;
+			.scoll-img {
+				width: 227rpx;
+				border-top-right-radius: 25rpx;
+				border-top-left-radius: 25rpx;
+				height: 227rpx;
+				overflow: hidden;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.scoll-name {
+				height: 80rpx;
+				width: 227rpx;
+				font-size: 22rpx;
+				padding: 15rpx 15rpx;
+			}
+			.price-list {
+				padding: 25rpx 15rpx;
+				padding-right: 25rpx;
+				.tpl {
+					.red-price {
+						color: #f31d29;
+						text {
+							font-size: 35rpx !important;
+							font-weight: bold;
+						}
+					}
+					.grey-price {
+						text-decoration: line-through;
+						color: #999999;
+						font-size: 10px !important;
+					}
+				}
+				.img {
+					width: 45rpx;
+					height: 45rpx;
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 187 - 0
pages/product/common/productBottom.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="page-bottom">
+		<view class="btm-btn">
+			<view class="add-btn" @click="buy(2)" v-if="showAdd">加入购物车</view>
+			<view class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">{{showAdd? '立即购买': '立即兑换'}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { collectAdd, collectDel } from '@/api/product.js';
+export default {
+	props: {
+		many: {
+			default: 9
+		},
+		goodsObjact: {
+			default: function() {
+				return {};
+			}
+		},
+		goodsid: {
+			default: ''
+		},
+		showAdd: {
+			type: Boolean,
+			default: true
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		buy(type) {
+			this.$emit('specOPne', type);
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* 底部操作菜单 */
+.page-bottom {
+	position: fixed;
+	bottom: 0rpx;
+	z-index: 95;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 750rpx;
+	height: 120rpx;
+	background-color: #ffffff;
+	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	border-radius: 16rpx; */
+	.p-b-btn {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		font-size: $font-sm;
+		color: $font-color-base;
+		width: 96rpx;
+		height: 80rpx;
+		.iconfont {
+			font-size: 40rpx;
+			line-height: 48rpx;
+			color: $font-color-light;
+		}
+		&.active,
+		&.active .iconfont {
+			color: $uni-color-primary;
+		}
+		.iconlikefill {
+			font-size: 46rpx;
+		}
+		image {
+			width: 56rpx;
+			height: 58rpx;
+		}
+	}
+	.action-btn-group {
+		display: flex;
+		height: 76rpx;
+		border-radius: 100px;
+		overflow: hidden;
+		margin-left: 20rpx;
+		position: relative;
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			right: 50%;
+			transform: translateY(-50%);
+			height: 28rpx;
+			width: 0;
+			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		}
+		.action-btn {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			// width: 270rpx;
+			// height: 100%;
+			font-size: $font-base;
+			padding: 0;
+			border-radius: 0;
+			background: transparent;
+			width: 339rpx;
+			height: 90rpx;
+			&.buy-now-btn {
+				background-color: #303e49;
+			}
+			&.add-cart-btn {
+				background-color: #fff;
+				color: #ff4c4c;
+				border: #ff4c4c 1px solid;
+			}
+		}
+	}
+}
+.p-b-btn {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	font-size: $font-sm;
+	color: $font-color-base;
+	width: 96rpx;
+	height: 80rpx;
+	.iconfont {
+		font-size: 40rpx;
+		line-height: 48rpx;
+		color: $font-color-light;
+	}
+	&.active,
+	&.active .iconfont {
+		color: $uni-color-primary;
+	}
+	.icon-fenxiang2 {
+		font-size: 42rpx;
+		transform: translateY(-2rpx);
+	}
+	.iconlikefill {
+		font-size: 46rpx;
+	}
+}
+.btm-btn {
+	z-index: 2;
+	width: 750rpx;
+	height: 97rpx;
+	display: flex;
+	// justify-content: space-between;
+	position: fixed;
+	bottom: 0;
+	background-color: #fff;
+	text-align: center;
+	.add-btn {
+		text-align: center;
+		width: 375rpx;
+		height: 97rpx;
+		background: #FFB238;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #fff;
+		line-height: 97rpx;
+	}
+	.buy-btn {
+		text-align: center;
+		border: none;
+		width: 375rpx;
+		height: 97rpx;
+		background: #6EAB4E;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #fff;
+		line-height: 97rpx;
+		color: #fff;
+	}
+	.quck {
+		width: 699rpx;
+		height: 90rpx;
+		background: #6EAB4E;
+		border-radius: 45rpx;
+		margin: auto;
+	}
+}
+</style>

+ 159 - 0
pages/product/common/productContent.vue

@@ -0,0 +1,159 @@
+<template>
+	<view class="introduce-section">
+		
+		<!-- 分享 -->
+		<button open-type="share" class="shareDate" style="border: none;" @click="open">
+			<image class="share-img" src="../../../static/icon/share.png"></image>
+		</button>
+		<!-- 价格信息 -->
+		<view class="price-box">
+			<text class="price-tip">¥</text>
+			<view class="price">
+				{{ goodsObjact.price }}
+				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
+			</view>
+		</view>
+		<!-- 商品名称 -->
+		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		goodsObjact: {
+			type: Object,
+			default: function() {
+				return {
+					percent:1
+				};
+			}
+		}
+	},
+	filters: {
+		parseIntTo(percent) {
+			percent = +percent * 100;
+			if (percent % 1 === 0) {
+				return percent;
+			} else {
+				percent = percent.toFixed(1);
+				return percent;
+			}
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		open() {
+			this.$emit('callf')
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* 标题简介 */
+.introduce-section {
+	position: relative;
+	background: #fff;
+	padding: 35rpx 0rpx;
+	padding-left: 35rpx;
+	.title {
+		font-size: 32rpx;
+		color: $font-color-dark;
+		.tip-o {
+			color: #ff3334;
+			padding-left: 15rpx;
+		}
+	}
+	.shareDate {
+		position: absolute;
+		top: 25rpx;
+		right: 10rpx;
+		font-size: 26rpx;
+		color: #3d3f46;
+		border-radius: 15rpx;
+		background-color: #ffffff;
+		height: 60rpx;
+		line-height: 60rpx;
+		&::after {
+			border: none;
+		}
+	}
+	.share-img {
+		width: 30rpx;
+		height: 30rpx;
+		position: relative;
+		top: 5rpx;
+		left: 0;
+		margin-right: 10rpx;
+	}
+	.info {
+		color: #999999;
+		font-size: 26rpx;
+		padding-bottom: 15rpx;
+	}
+	.progress-box {
+		width: 260rpx;
+		position: relative;
+		margin-top: 15rpx;
+		line-height: 10px;
+		.number {
+			font-size: 17rpx;
+			position: absolute;
+			z-index: 999;
+			top: 3rpx;
+			left: 15rpx;
+			color: #ffffff;
+		}
+	}
+	.price-box {
+		display: flex;
+		align-items: baseline;
+		height: 64rpx;
+		padding: 10rpx 0;
+		font-size: 26rpx;
+		color: $uni-color-primary;
+	}
+	.price {
+		font-size: $font-lg + 6rpx;
+		.text {
+			padding-left: 5rpx;
+			color: #b0b0b0;
+			font-size: 22rpx !important;
+		}
+	}
+	.price-green {
+		color: #2dbd59;
+		font-size: 28rpx !important;
+		text {
+			background: #2dbd59;
+			color: #ffffff;
+			padding: 0rpx 10rpx;
+			border-radius: 5rpx;
+			font-size: 22rpx !important;
+			margin-left: 15rpx;
+		}
+	}
+	.m-price {
+		margin: 0 12rpx;
+		color: $font-color-light;
+		text-decoration: line-through;
+		margin-left: 25rpx;
+		font-size: 24rpx;
+	}
+}
+.share-wrapper {
+	width: 36rpx;
+	height: 36rpx;
+	position: absolute;
+	top: 27rpx;
+	right: 43rpx;
+	background-color: #fff;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+</style>

+ 98 - 0
pages/product/common/topSwiper.vue

@@ -0,0 +1,98 @@
+<template>
+	<view class="carousel">
+		<swiper  :circular="true" duration="400" @change="swiperChange">
+			<swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
+				<view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
+			</swiper-item>
+		</swiper>
+		<view class="swiper-dots">
+			<text class="num">{{ swiperCurrent + 1 }}</text>
+			<text class="sign">/</text>
+			<text class="num">{{ imgList | num }}</text>
+		</view>
+	</view>
+	
+</template>
+
+<script>
+export default {
+	props: {
+		imgList: {
+			type: Array,
+			default: function () {
+				return []
+			}
+		},
+	},
+	data() {
+		return {
+			swiperCurrent: 0,
+			swiperLength: 0
+		};
+	},
+	filters: {
+		num(val) {
+			if(val){
+				
+				return val.length
+			}
+			return 0
+		}
+	},
+	methods: {
+		swiperChange(e) {
+			let index = e.detail.current;
+			this.swiperCurrent = index;
+			
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.carousel {
+	/* #ifdef APP-PLUS */
+	padding-top: var(--status-bar-height);
+	/* #endif */
+	height: 520rpx;
+	position: relative;
+	swiper {
+		height: 100%;
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 100%;
+	}
+	.swiper-item {
+		display: flex;
+		justify-content: center;
+		align-content: center;
+		height: 700rpx;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+.swiper-dots {
+	position: absolute;
+	bottom: 30rpx;
+	right: 26rpx;
+	color: red;
+	background-color: red;
+	z-index: 99;
+	width: 88rpx;
+	height: 42rpx;
+	background: #000000;
+	opacity: 0.5;
+	border-radius: 21rpx;
+
+	font-size: 28rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #FFFFFF;
+	line-height: 42rpx;
+	text-align: center;
+}
+</style>

+ 1156 - 0
pages/product/product.vue

@@ -0,0 +1,1156 @@
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 标题 -->
+		<view class="introduce-section" v-if="goodsType == 0">
+			<button class="shareDate" style="border: none;" @click="callf()">
+				<image class="share-img" src="../../static/icon/share.png"></image>
+			</button>
+			<view class="price-box">
+				<text class="price-tip">¥</text>
+				<view class="price">
+					{{ goodsObjact.price }}
+					<text class="m-price">¥{{ goodsObjact.ot_price }}</text>
+				</view>
+			</view>
+			<text class="title clamp2" v-if="goodsObjact.title">{{ goodsObjact.title }}</text>
+			<text class="title clamp2" v-else>{{ goodsObjact.store_name }}</text>
+		</view>
+		<view class="introduce-section" v-if="goodsType == 2">
+			<button class="shareDate" style="border: none;" @click="callf()">
+				<image class="share-img" src="../../static/icon/share.png"></image>
+			</button>
+			<view class="price-box-jf">
+				<!-- <text class="price-tip">¥</text> -->
+				<view class="price">
+					<image src="../../static/icon/jf.png" mode=""></image>
+					<text>{{goodsObjact.integral}}</text><text class="jf">积分</text>
+					<text class="m-price">¥{{ goodsObjact.ot_price }}</text>
+				</view>
+			</view>
+			<text class="title clamp2" v-if="goodsObjact.title">{{ goodsObjact.title }}</text>
+			<text class="title clamp2" v-else>{{ goodsObjact.store_name }}</text>
+		</view>
+		<!-- <product-content :goodsObjact="goodsObjact" v-if="!isSckill "></product-content> -->
+		<view class="good-title " v-if="isSckill">{{ goodsObjact.title }}</view>
+		<!-- 兑换说明 -->
+		<view class="dhsm" v-if="goodsType == 2">
+			<view class="title">
+				兑换说明
+			</view>
+			<view class="info">
+				兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明
+			</view>
+		</view>
+		<!-- 评价 -->
+		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsObjact.product_id)" v-if="reply" :reply="reply"
+			:list="list"></estimate>
+		<!-- 规格信息 -->
+		<!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<product-bottom @buy="buy" :goodsid="goodsid" @specOPne="specOPne" :showAdd="showAdd"></product-bottom>
+		<!-- 规格-模态层弹窗 -->
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer attr-content" @click.stop="stopPrevent">
+				<view class="a-t">
+					<image :src="actionImage"></image>
+					<view class="right">
+						<text class="name clamp">{{ goodsObjact.store_name }}</text>
+						<view class="price">
+							<text>¥</text>
+							{{ actionPrice * goodsNumber }}
+						</view>
+						<image src="../../static/icon/del.png" mode="" class="right-img" @click="closes()"></image>
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>选择{{ item.attr_name }}分类</text>
+					<view class="item-list">
+						<text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
+							:class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<view class="mun-box">
+					<text>购买数量</text>
+					<view class="num">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
+							@eventChange="numberChange"></uni-number-box>
+					</view>
+				</view>
+				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
+				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+			</view>
+		</view>
+		<view class="mask" v-if="show">
+			<image @click="onTap" src="../../static/img/shareimg.png"></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		goodsDetail,
+		cartAdd,
+		seckillGoods,
+		getIntegraDetail
+	} from '@/api/product.js';
+	import {
+		mapState
+	} from 'vuex';
+	import store from '@/store/index.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		weixindata
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// 头部轮播图
+	import topSwiper from './common/topSwiper.vue';
+	// 标题
+	import productContent from './common/productContent.vue';
+	// 到货时间及优惠
+	import discounts from './common/discounts.vue';
+	// 规格信息
+	import freshDetail from './common/freshDetail.vue';
+	// 图文详情
+	import contentText from './common/contentText.vue';
+	// 底部按钮
+	import productBottom from './common/productBottom.vue';
+	// 猜你喜欢
+	import guessLike from './common/guessLike.vue';
+	// 评价
+	import estimate from './common/estimate.vue';
+	import {
+		timeComputed
+	} from '@/utils/rocessor.js';
+	import uniNumberBox from '@/components/uni-number-box.vue'
+	export default {
+		components: {
+			guessLike,
+			topSwiper,
+			productContent,
+			discounts,
+			freshDetail,
+			contentText,
+			productBottom,
+			estimate,
+			uniNumberBox
+		},
+		data() {
+			return {
+				showAdd: true, //是否显示加入购物车
+				show: false,
+				isSckill: false, //是否为秒杀
+				goodsStore: 0, //选中库存
+				specList: [],
+				buys_show: true,
+				buys_shows: false,
+				specSelected: [], //选中的分类
+				specClass: 'none', //显示隐藏弹窗
+				many: 1, //1是单规格  2是多规格
+				reply: '', //评论
+				list: '', //商品详情的数据
+				type: 1, //默认支付方式add为
+				goodsType: 0, //商品类型 0:普通,1:秒杀 ,2:积分
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				description: '', //商品描述
+				goodsObjact: {
+					percent: 1
+				}, //保存商品数据
+				//图片循环
+				imgList: [],
+				// 对比对象
+				actionPrice: 0, //默认选中商品价格
+				actionImage: '', //默认选中图片
+				good_list: '', //猜你喜欢列表
+				goodsNumberMax: 0, //最大可购买数量
+				goodsNumberMin: 0, //最小可购买数量
+				// 倒计时数据保存
+				seckillObj: {
+					stopTime: 0, //结束时间
+					stop: false, //是否结束
+					stopTimeH: 0, //小时
+					stopTimeM: 0, //分钟
+					stopTimeS: 0, //秒钟
+					stopTimeD: 0, //天
+					upTime: 0 //更新组件内部组件用
+				},
+				// 拼团数据保存
+				pink: {
+					id: '', //拼团编号
+					uid: '', //用户编号
+					people: '', //拼团人数
+					price: '', //拼团价格
+					stop_time: '', //拼团结束时间
+					nickname: '', //团长昵称
+					avatar: '', //团长头像
+					count: '', //拼团剩余人数
+					h: '', //时
+					i: '', //分
+					s: '' //秒
+				},
+				userInfo: ''
+			};
+		},
+		filters: {
+			parseIntTo(percent) {
+				percent = +percent * 100;
+				if (percent % 1 === 0) {
+					return percent;
+				} else {
+					percent = percent.toFixed(1);
+					return percent;
+				}
+			}
+		},
+		async onLoad(options) {
+			let obj = this;
+			obj.userInfo = uni.getStorageSync('userInfo');
+			//保存商品id
+			this.goodsid = options.id;
+			this.goodsType = options.type * 1;
+			if (this.goodsType == 2) {
+				this.showAdd = false
+				console.log('不显示', this.showAdd)
+			}
+			console.log(this.goodsType, 'this.goodsTypethis.goodsTypethis.goodsTypethis.goodsType')
+			if (options.type == 1) {
+				obj.isSckill = true
+			}
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			saveUrl();
+			this.goodsDetail();
+			// 注册邀请信息
+			// #ifdef H5
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				weixindata();
+			}
+			// #endif
+		},
+		computed: {
+			...mapState(['weichatObj', 'baseURL', 'urlFile'])
+		},
+		// 分享
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let shareObj = {
+				title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
+				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.goodsObjact.image,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+
+			return shareObj;
+		},
+		methods: {
+			//选择规格
+			selectSpec(item, arr, ind) {
+				arr.attr_value.forEach(function(e) {
+					e.check = false;
+				});
+				item.check = true;
+				let obj = this;
+				obj.specSelected[ind] = item.attr;
+				let str = obj.specSelected.join(',');
+				// 获取当前选中的对象
+				if (obj.productValue[str]) {
+					obj.buys_show = true;
+					obj.buys_shows = false;
+					obj.actionPrice = obj.productValue[str].price;
+					// obj.goodsNumberMax = obj.productValue[str].quota;
+					obj.actionImage = obj.productValue[str].image;
+					obj.uniqueId = obj.productValue[str].unique;
+					obj.goodsStore = obj.productValue[str].stock;
+				} else {
+					(obj.buys_show = false), (obj.buys_shows = true);
+				}
+				if (obj.goodsStore == 0) {
+					obj.buys_show = false;
+					obj.buys_shows = true;
+				}
+				obj.specSelected[ind] = item.attr;
+			},
+			// 打開彈窗
+			specOPne(type = 1) {
+				let obj = this;
+				obj.specClass = 'show';
+				obj.type = type
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 保存当前购买类型
+				this.type = str;
+			},
+			//领取优惠券
+			Getcoupon() {
+				uni.navigateTo({
+					url: '/pages/coupon/getcoupon'
+				});
+			},
+			//详情页
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id
+				});
+			},
+			// 跳转页面
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			//加入购物车
+			Addcar(item) {
+				let obj = this;
+				cartAdd({
+						cartNum: '1', //商品数量
+						uniqueId: '', //商品标签
+						new: 0, //商品是否新增加到购物车1为不加入0为加入
+						mer_id: '',
+						productId: item.id //商品编号
+					})
+					.then(function(e) {
+						uni.showToast({
+							title: '成功加入购物车',
+							type: 'top',
+							duration: 500,
+							icon: 'none'
+						});
+
+						obj.goodsDetail();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			goodsDetail() {
+				let obj = this;
+				// 获取普通商品信息
+				console.log('获取商品信息++++++++++++++')
+				console.log(obj.goodsType)
+				if (obj.goodsType == 0) {
+					console.log('获取普通商品信息++++++++++++++')
+					goodsDetail({}, this.goodsid).then(function({
+						data
+					}) {
+						obj.list = data;
+						console.log(obj.list, '普通商品数据')
+						obj.good_list = data.good_list; //保存猜你喜欢列表
+						obj.reply = data.reply; //保存评论列表
+						let goods = data.storeInfo;
+						obj.goodsObjact = goods;
+						if (obj.goodsObjact.description != null) {
+							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
+								'<img class="rich-img"');
+						} //小程序商品详情图超出屏幕问题
+						obj.imgList = goods.slider_image; //保存轮播图
+						obj.specList = data.productAttr; //保存分类列表
+						if (Array.isArray(data.productValue) != true) {
+							obj.many = 2;
+							obj.specList = data.productAttr; //保存产品属性
+							obj.productValue = data.productValue; //保存属性值
+							obj.specSelected = []; //初始化默认选择对象
+							for (let i = 0; i < obj.specList.length; i++) {
+								// 设置默认数据
+								let attrValue = obj.specList[i].attr_value[0];
+								attrValue.check = true;
+								obj.specSelected.push(attrValue.attr);
+							}
+							let str = obj.specSelected.join(',');
+							console.log(str, 'str');
+							// 设置默认值
+							obj.actionPrice = obj.productValue[str].price;
+							obj.goodsNumberMax = obj.productValue[str].stock;
+							obj.actionImage = obj.productValue[str].image;
+							obj.uniqueId = obj.productValue[str].unique;
+							obj.goodsStore = obj.productValue[str].stock;
+						} else {
+							obj.many = 1;
+							obj.productValue = data.productValue; //保存分类查询数据
+							obj.actionPrice = goods.price; //保存默认选中商品价格
+							obj.actionImage = goods.image_base; //保存默认选中商品图片
+							obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+							obj.shopId = data.mer_id; //保存商店id
+						}
+
+					});
+				}
+				if (obj.goodsType == 1) {
+					seckillGoods({}, this.goodsid).then(({
+						data
+					}) => {
+						obj.list = data;
+						console.log(obj.list, '秒杀商品数据++++++++++')
+						// obj.good_list = data.good_list; //保存猜你喜欢列表
+						obj.reply = data.reply; //保存评论列表
+						let goods = data.storeInfo;
+						obj.goodsNumberMax = goods.num
+						// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
+						const time = timeComputed(goods.stop_time * 1000);
+						obj.seckillObj = {
+							stop: time.tpye, //是否结束
+							stopTimeH: time.hours + time.day * 24, //小时
+							stopTimeM: time.minutes, //分钟
+							stopTimeS: time.seconds, //秒钟
+						}
+
+						console.log(obj.seckillObj, '数据');
+						// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
+						obj.goodsObjact = goods;
+						if (obj.goodsObjact.description != null) {
+							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
+								'<img class="rich-img"');
+						} //小程序商品详情图超出屏幕问题
+						obj.imgList = goods.images; //保存轮播图
+						obj.specList = data.productAttr; //保存分类列表
+						if (Array.isArray(data.productValue) != true) {
+							console.log('多规格+++++++++++++')
+							obj.many = 2;
+							obj.specList = data.productAttr; //保存产品属性
+							obj.productValue = data.productValue; //保存属性值
+							obj.specSelected = []; //初始化默认选择对象
+							for (let i = 0; i < obj.specList.length; i++) {
+								// 设置默认数据
+								let attrValue = obj.specList[i].attr_value[0];
+								attrValue.check = true;
+								obj.specSelected.push(attrValue.attr);
+							}
+							let str = obj.specSelected.join(',');
+							console.log(str, 'str');
+							// 设置默认值
+							obj.actionPrice = obj.productValue[str].price;
+							// obj.goodsNumberMax = obj.productValue[str].quota;
+							// console.log(obj.goodsNumberMax,'obj.goodsNumberMax++++++++++++')
+							obj.actionImage = obj.productValue[str].image;
+							obj.uniqueId = obj.productValue[str].unique;
+							obj.goodsStore = obj.productValue[str].stock;
+						} else {
+							console.log('单规格+++++++++++++')
+							obj.many = 1;
+							obj.productValue = data.productValue; //保存分类查询数据
+							obj.actionPrice = goods.price; //保存默认选中商品价格
+							obj.actionImage = goods.image_base; //保存默认选中商品图片
+							// obj.goodsNumberMax = goods.quota; //保存默认选中最大可购买商品数量
+							console.log(obj.goodsNumberMax, 'obj.goodsNumberMax---------------')
+							obj.shopId = data.mer_id; //保存商店id
+						}
+
+					})
+				}
+				if (obj.goodsType == 3) {
+					getIntegraDetail({}, this.goodsid).then(({
+						data
+					}) => {
+						obj.list = data;
+						console.log(obj.list, '积分商品数据++++++++++')
+						// obj.good_list = data.good_list; //保存猜你喜欢列表
+						obj.reply = data.reply; //保存评论列表
+						let goods = data.storeInfo;
+						obj.goodsNumberMax = goods.num
+						// console.log('obj.goodsNumberMin+++++++++',obj.goodsNumberMin)
+						// obj.seckillObj = timeComputed( goods.stop_time*1000);
+
+						// console.log(obj.seckillObj,'obj.seckillObj++++++++++++++++++++++')
+						obj.goodsObjact = goods;
+						if (obj.goodsObjact.description != null) {
+							obj.description = obj.goodsObjact.description.replace(/\<img/gi,
+								'<img class="rich-img"');
+						} //小程序商品详情图超出屏幕问题
+						obj.imgList = goods.images; //保存轮播图
+						obj.specList = data.productAttr; //保存分类列表
+						if (Array.isArray(data.productValue) != true) {
+							obj.many = 2;
+							obj.specList = data.productAttr; //保存产品属性
+							obj.productValue = data.productValue; //保存属性值
+							obj.specSelected = []; //初始化默认选择对象
+							for (let i = 0; i < obj.specList.length; i++) {
+								// 设置默认数据
+								let attrValue = obj.specList[i].attr_value[0];
+								attrValue.check = true;
+								obj.specSelected.push(attrValue.attr);
+							}
+							let str = obj.specSelected.join(',');
+							console.log(str, 'str');
+							// 设置默认值
+							obj.actionPrice = obj.productValue[str].price;
+							// obj.goodsNumberMax = obj.productValue[str].quota;
+							// console.log(obj.goodsNumberMax,'obj.goodsNumberMax++++++++++++')
+							obj.actionImage = obj.productValue[str].image;
+							obj.uniqueId = obj.productValue[str].unique;
+							obj.goodsStore = obj.productValue[str].stock;
+						} else {
+							obj.many = 1;
+							obj.productValue = data.productValue; //保存分类查询数据
+							obj.actionPrice = goods.price; //保存默认选中商品价格
+							obj.actionImage = goods.image_base; //保存默认选中商品图片
+							// obj.goodsNumberMax = goods.quota; //保存默认选中最大可购买商品数量
+							console.log(obj.goodsNumberMax, 'obj.goodsNumberMax---------------')
+							obj.shopId = data.mer_id; //保存商店id
+						}
+					})
+				}
+
+			},
+			// 立即购买
+			buy() {
+				let obj = this;
+				// 创建传值对象
+				let data = {
+					productId: obj.goodsid, //商品编号
+					cartNum: obj.goodsNumber, //商品数量
+					uniqueId: obj.uniqueId, //分类编号
+					new: 1,
+					secKillId: '',
+					integralId: '',
+				};
+				console.log(obj.goodsType, 'obj.goodsType77777777777777777777')
+				if (obj.goodsType == 1) {
+					data.secKillId = obj.goodsObjact.id
+					data.new = 1;
+				}
+				if (obj.goodsType == 2) {
+					data.new = 1;
+					data.integralId = obj.goodsObjact.id
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							console.log(obj.goodsType, 'this.goodsType456444444444444444')
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							obj.goodsDetail();
+						}
+						obj.toggleSpec()
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 阻止触发上级事件
+			stopPrevent() {},
+			//选择数量
+			numberChange(e) {
+				console.log(e)
+				this.goodsNumber = e.number
+			},
+			callf() {
+				this.show = true;
+			},
+			onTap() {
+				console.log(this.callf);
+
+				if (!this.callf) return;
+				this.close();
+			},
+			close() {
+				this.show = false;
+			},
+			closes() {
+				this.specClass = 'none';
+			},
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
+		}
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
+		}
+
+		&.none {
+			display: none;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
+		}
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 20vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				height: 66rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				background: #6EAB4E;
+				font-size: $font-base + 2rpx;
+				color: #fff;
+				margin: 30rpx auto 20rpx;
+			}
+		}
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
+		}
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
+		}
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
+		}
+	}
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 25rpx 30rpx;
+	
+		.a-t {
+			display: flex;
+	
+			image {
+				width: 170rpx;
+				height: 170rpx;
+				flex-shrink: 0;
+				border-radius: 8rpx;
+				background-color: #eee;
+			}
+	
+			.right {
+				display: flex;
+				flex-direction: column;
+				padding-left: 24rpx;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-base;
+				line-height: 42rpx;
+				width: 75%;
+				position: relative;
+				.right-img {
+					width: 37rpx;
+					height: 37rpx;
+					position: absolute;
+					right: 0;
+					top: 20rpx;
+					// background-color: red;
+				}
+				.price {
+					position: absolute;
+					bottom: 0;
+					font-size: $font-lg;
+					color: $uni-color-primary;
+					margin: 10rpx 0rpx;
+					font-size: 60rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ef041f;
+					text {
+						font-size: 30rpx;
+					}
+				}
+	
+				.name {
+					width: 350rpx;
+					font-size: 32rpx;
+					color: $font-color-dark;
+					height: 50rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					display: block;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #1d2023;
+				}
+	
+				.selected-text {
+					margin-right: 10rpx;
+				}
+			}
+		}
+	
+		.attr-list {
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base + 2rpx;
+			color: $font-color-base;
+			padding-top: 30rpx;
+			padding-left: 10rpx;
+		}
+	
+		.item-list {
+			padding: 20rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+	
+			text {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+				border-radius: 10rpx;
+				min-width: 60rpx;
+				height: 60rpx;
+				padding: 0 20rpx;
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+	
+			.selected {
+				background: #fceff1;
+				color: #f35768;
+				border: 1px solid #f35768;
+			}
+		}
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	page {
+		background: #f0f0f0;
+	}
+
+	//秒杀、拼团底部高度
+	.contentBottomHeight {
+		height: 130rpx;
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	/deep/ .iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
+	}
+
+	/deep/ .con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+
+	.cho-num {
+		margin: 20rpx 0;
+		width: 750rpx;
+		height: 83rpx;
+		background: #ffffff;
+		padding: 29rpx 24rpx 30rpx 25rpx;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #606972;
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30rpx;
+		height: 110rpx;
+		background: #fff;
+
+		.refund {
+			font-size: 30rpx;
+			color: $font-color-dark;
+			padding-left: 128rpx;
+		}
+
+		.noRefund {
+			font-size: 30rpx;
+			color: $font-color-light;
+			padding-left: 128rpx;
+		}
+
+		.tit {
+			flex-shrink: 0;
+			width: 120rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+			padding-left: 128rpx;
+
+			&.payColor {
+				color: $color-red;
+			}
+		}
+
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+	}
+
+	.shop-info {
+		width: 750rpx;
+		height: 140rpx;
+		margin: 20rpx 0;
+		padding: 28rpx 24rpx 22rpx 16rpx;
+		background-color: #fff;
+		display: flex;
+		position: relative;
+
+		.shop-logo {
+			width: 90rpx;
+			height: 90rpx;
+			border-radius: 50%;
+
+			// background-color: red;
+			// overflow: hidden;
+			image {
+				width: 90rpx;
+				height: 90rpx;
+			}
+		}
+
+		.shop-base {
+			padding-left: 15rpx;
+			// width: 376rpx;
+			width: 100%;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #999999;
+			line-height: 1;
+
+			.base-name {
+				padding-top: 14rpx;
+				font-size: 30rpx;
+				padding-bottom: 16rpx;
+				font-weight: 500;
+				color: #333333;
+			}
+		}
+
+		.shop-dis {
+			padding-top: 31rpx;
+			position: absolute;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #901b21;
+			// line-height: 140rpx;
+			right: 24rpx;
+
+			image {
+				padding-right: 5rpx;
+				width: 21rpx;
+				height: 21rpx;
+			}
+		}
+	}
+
+	.good-title {
+		background-color: #fff;
+		// height: 142rpx;
+		padding: 24rpx 19rpx 24rpx 34rpx;
+		line-height: 1.5;
+		font-size: 36rpx;
+		font-weight: 800;
+		color: #333333;
+	}
+
+	.introduce-section {
+		position: relative;
+		background: #fff;
+		padding: 35rpx 0rpx;
+		padding-left: 20rpx;
+
+		.title {
+			font-size: 32rpx;
+			color: $font-color-dark;
+			padding-right: 34rpx;
+
+			.tip-o {
+				color: #ff3334;
+				padding-left: 15rpx;
+			}
+		}
+
+		.shareDate {
+			position: absolute;
+			top: 25rpx;
+			right: 10rpx;
+			font-size: 26rpx;
+			color: #3d3f46;
+			border-radius: 15rpx;
+			background-color: #ffffff;
+			height: 60rpx;
+			line-height: 60rpx;
+
+			&::after {
+				border: none;
+			}
+		}
+
+		.share-img {
+			width: 30rpx;
+			height: 30rpx;
+			position: relative;
+			top: 5rpx;
+			left: 0;
+			margin-right: 10rpx;
+		}
+
+		.info {
+			color: #999999;
+			font-size: 26rpx;
+			padding-bottom: 15rpx;
+		}
+
+		.progress-box {
+			width: 260rpx;
+			position: relative;
+			margin-top: 15rpx;
+			line-height: 10px;
+
+			.number {
+				font-size: 17rpx;
+				position: absolute;
+				z-index: 999;
+				top: 3rpx;
+				left: 15rpx;
+				color: #ffffff;
+			}
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			height: 64rpx;
+			padding: 10rpx 0;
+			font-size: 27rpx;
+			color: #FF0000;
+		}
+
+		.price {
+			font-size: $font-lg + 6rpx;
+
+			.text {
+				padding-left: 5rpx;
+				color: #b0b0b0;
+				font-size: 22rpx !important;
+			}
+		}
+
+		.price-green {
+			color: #2dbd59;
+			font-size: 28rpx !important;
+
+			text {
+				background: #2dbd59;
+				color: #ffffff;
+				padding: 0rpx 10rpx;
+				border-radius: 5rpx;
+				font-size: 22rpx !important;
+				margin-left: 15rpx;
+			}
+		}
+
+		.m-price {
+			margin: 0 12rpx;
+			color: $font-color-light;
+			text-decoration: line-through;
+			margin-left: 25rpx;
+			font-size: 24rpx;
+		}
+	}
+
+	.dhsm {
+		display: flex;
+		margin: 20rpx 0;
+		background-color: #fff;
+		padding: 34rpx 104rpx 30rpx 24rpx;
+
+		.title {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			margin-right: 32rpx;
+			flex-shrink: 0;
+		}
+
+		.info {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #8A8A8A;
+			line-height: 38rpx;
+		}
+	}
+
+	.price-box-jf {
+		color: #901b21;
+		display: flex;
+		align-items: baseline;
+		height: 64rpx;
+		font-size: 50rpx;
+		font-family: PingFang SC;
+		font-weight: 800;
+		color: #FF0000;
+
+		.price {
+			font-size: 50rpx;
+		}
+
+		image {
+			height: 30rpx;
+			width: 30rpx;
+		}
+
+		.jf {
+			font-size: 30rpx;
+
+		}
+	}
+	.mun-box {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+	.mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 999;
+		background-color: rgba(0, 0, 0, 0.4);
+
+		image {
+			width: 100%;
+			height: 100%;
+			opacity: 0.8;
+		}
+	}
+</style>

+ 201 - 0
pages/public/forget.vue

@@ -0,0 +1,201 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image> -->
+		</view>
+		<view class="loginTitle"><text>手机号登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
+					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+				</view>
+			</view>
+			<view>
+				<button type="green" @click="register" class="uni-button uni-button-green">登录</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { mapMutations } from 'vuex';
+import { verify, loginMobile, getUserInfo } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			phone: '', //用户
+			code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 //倒计时
+		};
+	},
+	onLoad() {},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 手机登录
+		register() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
+				obj.$api.msg('请输入正确的手机号');
+				return;
+			}
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
+
+			loginMobile({
+				phone: obj.phone, //账号
+				captcha: obj.code
+			}).then(function(e) {
+				uni.setStorageSync('token', e.data.token);
+				getUserInfo({}).then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					//成功跳转首页
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				});
+			}).catch((e) => {
+				console.log(e);
+			});
+		},
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'login'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		login() {
+			//返回登录
+			uni.navigateTo({
+				url: '/pages/public/login'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	background-color: #ff4c4c;
+	top: 0rpx;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+			.width {
+				width: 325rpx !important;
+			}
+			.code {
+				color: #ff4c4c;
+				font-size: 23rpx;
+				border-left: 1px solid #eeeeee;
+				width: 150rpx;
+				flex-shrink: 0;
+				text-align: center;
+			}
+		}
+	}
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+
+uni-button {
+	height: 80rpx !important;
+	line-height: 80rpx !important;
+}
+
+</style>

+ 387 - 0
pages/public/login.vue

@@ -0,0 +1,387 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"> -->
+		</image>
+		</view>
+		<view class="loginTitle"><text>登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
+			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<view class="flex other">
+				<view class="fenge"></view>
+				<view class="qita">其他方式登录</view>
+				<view class="fenge"></view>
+			</view>
+			<!-- #ifndef APP-PLUS -->
+			<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
+			<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<block v-if="!is_ios">
+				<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
+				<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			</block>
+			<block v-else>
+				<view class="ios_login flex" @click="wecahtLogin('weixin')">
+					<text class="iconfont iconweixin"></text>
+					<text class="weixin_text">微信登录</text>
+				</view>
+				<view v-if="is_apple_login" class="ios_login flex" @click="wecahtLogin('apple')">
+					<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
+					<text class="weixin_text">通过Apple登录</text>
+				</view>
+			</block>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex';
+import { login } from '@/api/login.js';
+import { getUserInfo } from '@/api/user.js';
+// #ifdef APP-PLUS
+// applelogin接口需要开发编写,基础项目中可能没有
+import { applelogin } from '@/api/set.js';
+// loginWx接口需要开发编写,基础项目中可能没有
+import { loginWx } from '@/api/login.js';
+// #endif
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+export default {
+	data() {
+		return {
+			username: '',
+			passward: '',
+			// #ifdef APP-PLUS
+			is_ios: false, //判断是否为ios手机
+			is_apple_login: false //是否有ios授权登录功能
+			// #endif
+		};
+	},
+	onLoad() {
+		let obj = this;
+		// #ifdef APP-PLUS
+		let system = uni.getStorageSync('platform');
+		// 判断是否为ios
+		if (system == 'ios') {
+			obj.is_ios = true;
+		}
+		uni.getSystemInfo({
+			success(e) {
+				if (+e.system.split('.')[0] >= 13) {
+					obj.is_apple_login = true;
+				}
+			}
+		});
+		// #endif
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 微信登录
+		wecahtLogin(type) {
+			let obj = this;
+			// #ifdef H5
+			let weichatBrowser = uni.getStorageSync('weichatBrowser');
+			if (weichatBrowser) {
+				loginWinxin();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			uni.login({
+				provider: type,
+				success(e) {
+					uni.getUserInfo({
+						provider: type,
+						success(es) {
+							if (type === 'weixin') {
+								loginWx(es.userInfo)
+									.then(e => {
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(e => {
+										console.log(e);
+										uni.showModal({
+											content: JSON.stringify(e),
+											success() {},
+											fail() {}
+										});
+									});
+							}
+							if (type === 'apple') {
+								console.log(es.userInfo);
+								applelogin({
+									account: es.userInfo.openId
+								})
+									.then(function(e) {
+										console.log(e, 'token');
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(function(e) {
+										console.log(e);
+									});
+							}
+						},
+						fail(es) {
+							uni.showModal({
+								content: JSON.stringify(es),
+								success() {
+									// obj.login();
+									// // 保存返回用户数据
+									// obj.setUserInfo(e.data);
+									// //成功跳转首页
+									// uni.switchTab({
+									// 	url: '/pages/index/index'
+									// });
+								}
+							});
+						}
+					});
+				},
+				fail(e) {
+					uni.showModal({
+						title: '提示',
+						content: JSON.stringify(e),
+						showCancel: false
+					});
+				}
+			});
+			// #endif
+		},
+		//登录
+		async toLogin() {
+			let obj = this;
+			obj.logining = true;
+			if (obj.username == '') {
+				obj.$api.msg('请输入手机号');
+				return;
+			}
+			if (obj.passward == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			login({
+				account: obj.username,
+				password: obj.passward
+			})
+				.then(function(e) {
+					uni.setStorageSync('token', e.data.token);
+					// obj.$store.commit('hasLogin', true);
+					obj.login()
+					getUserInfo({}).then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+						let ur = uni.getStorageSync('present') || '/pages/index/index';
+						//成功跳转首页
+						uni.switchTab({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index'
+										});
+									}
+								});
+							}
+						});
+					});
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//跳转注册页
+		register() {
+			uni.navigateTo({
+				url: `/pages/public/register`
+			});
+		},
+		// 后退
+		navBack() {
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* #ifdef APP-PLUS */
+
+.ios_login {
+	width: 260rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 10rpx;
+	background-color: #212121;
+	color: #ffffff;
+	.loginIcon {
+		width: 50rpx;
+		height: 50rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+/* #endif */
+.ios_login {
+	width: 350rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 15rpx;
+	background-color: #212121;
+	color: #ffffff;
+	font-size: 32rpx;
+	.loginIcon {
+		font-size: 35rpx;
+		width: 35rpx;
+		height: 35rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	background-color: #ff4c4c;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color: #ff4c4c;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+</style>

+ 282 - 0
pages/public/register.vue

@@ -0,0 +1,282 @@
+<template>
+	<view class="container">
+		<view class="container_text" >
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image> -->
+		</view>
+		<view class="loginTitle"><text>注册</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入账号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus placeholder="请输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus placeholder="请重复输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
+			</view>
+			<!-- <view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
+					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+				</view>
+			</view> -->
+			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
+			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true" hover-class="none" @click="login">返回登录</button></view>
+		</view>
+	</view>
+</template>
+<script>
+import { register, verify } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			phone: '', //用户
+			password: '', //密码
+			repassword: '',
+			invitation: '', //邀请码
+			code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 ,//倒计时
+		};
+	},
+	onLoad() {
+		// 获取扫码邀请人id
+		this.invitation = uni.getStorageSync('spread')||'';
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		// 注册
+		register() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入账号');
+				return;
+			}
+			// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
+			// 	obj.$api.msg('请输入正确的手机号');
+			// 	return;
+			// }
+			if (obj.password == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			if (obj.repassword == '') {
+				obj.$api.msg('请再次输入密码');
+				return;
+			}
+			if (obj.repassword != obj.password) {
+				obj.$api.msg('两次密码不正确');
+				return;
+			}
+			// if ((obj.invitation = '')) {
+			// 	obj.$api.msg('请输入邀请码');
+			// 	return;
+			// }
+			// if (obj.code == '') {
+			// 	obj.$api.msg('请输入验证码');
+			// 	return;
+			// }
+			register({
+				account: obj.phone, //账号
+				// captcha: obj.code, //验证码
+				password: obj.password ,//密码
+				spread:this.invitation//上级推广人
+			}).then(function(e) {
+				uni.showToast({
+					title:'注册成功',
+					duration:2000,
+					position:'top'
+				});
+				setTimeout(function () {
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				},1000)
+				
+			});
+			//调用注册接口,成功跳转登录页
+		},
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'register'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		login() {
+			//返回登录
+			uni.navigateTo({
+				url: '/pages/public/login'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	background-color: #FF4343;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color:  $base-color;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid  $base-color;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color:  $base-color;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+
+.forget {
+	width: 100rpx;
+	font-size: 24rpx;
+	color: #ffffff;
+	margin: 0px auto;
+	border-bottom: 1px solid #ffffff;
+}
+.width {
+	width: 325rpx !important;
+}
+.code {
+	color:  $base-color;
+	font-size: 23rpx;
+	border-left: 1px solid #eeeeee;
+	width: 150rpx;
+	flex-shrink: 0;
+	text-align: center;
+}
+uni-button {
+	height: 80rpx !important;
+	line-height: 80rpx !important;
+}
+
+</style>
+

+ 291 - 0
pages/public/wxLogin.vue

@@ -0,0 +1,291 @@
+<template>
+	<view class="content">
+		<!-- #ifdef MP -->
+		<image class="bg-img" src="/static/img/img09.png" mode=" scaleToFill"></image>
+		<view class="logo-img-box">
+			<image class="logo-img" src="/static/img/logo.png" mode=" aspectFit"></image>
+			<button class="userInfo" type="warn" open-type="getUserInfo" @getuserinfo="userInfoData">
+				<text class="iconfont iconweixin"></text>
+				<text>微信授权登录</text>
+			</button>
+		</view>
+		<!-- #endif -->
+		<view class="Mask" v-show="MaskShow">
+			<view class="Mask-box">
+				<view class="title">申请获取您的手机号</view>
+				<view class="text">为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权</view>
+				<view class="btn_box">
+					<button class="weixin" @click="ToIndex()">取消</button>
+					<button class="weixin" open-type="getPhoneNumber" @getphonenumber="PhoneNumber">手机号授权</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+// #ifdef MP-WEIXIN
+import { wechatMpAuth } from '@/api/wx';
+// #endif
+import { mapMutations } from 'vuex';
+import { getUserInfo, bangding } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			userInfo: {}, //授权用户信息
+			code: '', //授权code
+			loding: false, //判断是否在点击中
+			MaskShow: false // 手机号授权弹窗
+		};
+	},
+	onLoad(option) {
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			// #ifdef H5
+			loginWinxin();
+			// #endif
+		},
+		// #ifndef H5
+		// 用户确认授权
+		userInfoData(e) {
+			const that = this;
+			// #ifdef MP-WEIXIN
+			if (!this.loding) {
+				wx.getUserProfile({
+					desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success: res => {
+						that.userInfo = res;
+						that.loadMp();
+					},
+					fail: err => {
+						console.log('getUserProfile出错', err);
+					}
+				});
+			}
+			// #endif
+		},
+		// #endif
+		// #ifdef MP-WEIXIN
+		loadMp(option) {
+			let obj = this;
+			obj.loding = true;
+			// 获取登录授权页数据
+			let user = obj.userInfo;
+			// 获取推广人id
+			let spread_spid = uni.getStorageSync('spread') || '';
+			// let spread_code = uni.getStorageSync('spread_code') || '';
+			uni.showLoading({
+				title: '授权中',
+				mask: true
+			});
+			wx.login({
+				success(e) {
+					wechatMpAuth({
+						code: e.code,
+						iv: user.iv,
+						encryptedData: user.encryptedData,
+						spread_spid: spread_spid,
+						// #ifdef MP
+						spread_code: spread_code
+						// #endif
+					})
+						.then(({ data }) => {
+							obj.loding = false;
+							obj.wchatAuth(data);
+							console.log(data);
+						})
+						.catch(e => {
+							obj.loding = false;
+							uni.hideLoading();
+						});
+				},
+				fill: function(e) {
+					obj.loding = false;
+					console.log(e);
+				}
+			});
+		},
+		wchatAuth(data) {
+			let obj = this;
+			// 保存token
+			uni.setStorageSync('token', data.token);
+			// 获取用户基础信息
+			getUserInfo({})
+				.then(e => {
+					uni.hideLoading();
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					obj.ToIndex();
+					// if (e.data.phone == null || !e.data.phone ) {
+					// 	obj.MaskShow = true;
+					// } else {
+					// 	obj.ToIndex();
+					// }
+				})
+				.catch(e => {
+					uni.hideLoading();
+				});
+		},
+		// #endif
+		ToIndex() {
+			let obj = this;
+			let ur = uni.getStorageSync('present') || '/pages/index/index';
+			// 用于处理缓存bug
+			if (ur == 'pages/product/product') {
+				ur = '/pages/index/index';
+			}
+			uni.switchTab({
+				url: ur,
+				fail(e) {
+					uni.navigateTo({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: '/pages/index/index'
+							});
+						}
+					});
+				}
+			});
+		},
+		// 绑定手机号
+		PhoneNumber(e) {
+			let obj = this;
+			obj.MaskShow = false;
+			(obj.iv = e.detail.iv), (obj.encryptedData = e.detail.encryptedData);
+
+			uni.setStorageSync('code', obj.code);
+			bangding({
+				flag: 1,
+				cache_key: obj.cache_key,
+				code: obj.code,
+				iv: obj.iv,
+				encryptedData: obj.encryptedData
+			}).then(function(e) {
+				if (e.data.is_bind == 1) {
+					console.log('bangding1');
+					bangding({
+						flag: 1,
+						cache_key: obj.cache_key,
+						code: obj.code,
+						iv: obj.iv,
+						encryptedData: obj.encryptedData,
+						step: 1
+					})
+						.then(function(e) {
+							// 获取用户基础信息
+							obj.GetUser();
+							obj.$api.msg(e.msg);
+							obj.$nextTick(function() {
+								obj.ToIndex();
+							});
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				} else {
+					console.log('bangding2');
+					obj.$api.msg(e.msg);
+					// 获取用户基础信息
+					obj.GetUser();
+					obj.$api.msg(e.msg);
+					obj.$nextTick(function() {
+						obj.ToIndex();
+					});
+				}
+			});
+		},
+		GetUser() {
+			// 获取用户基础信息
+			getUserInfo({})
+				.then(({ data }) => {
+					this.setUserInfo(data);
+					console.log(data, 11);
+					console.log(uni.getStorageSync('userInfo'), 55);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+}
+
+.Mask {
+	position: fixed;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(51, 51, 51, 0.7);
+	.Mask-box {
+		margin: auto;
+		margin-top: 320rpx;
+		padding: 50rpx 30rpx;
+		width: 90%;
+		height: 450rpx;
+		top: 500rpx;
+		left: 10%;
+		background-color: #ffffff;
+		border-radius: 15rpx;
+		.title {
+			text-align: center;
+			font-size: 35rpx;
+			font-weight: 700;
+		}
+		.text {
+			font-size: 30rpx;
+			color: #848484;
+			padding-top: 50rpx;
+		}
+		.btn_box {
+			margin: 70rpx 0 0 0;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+	}
+}
+
+.weixin {
+	// background: linear-gradient(90deg, rgba(36, 214, 78, 1), rgba(45, 187, 89, 1));
+	background: $base-color;
+	width: 40%;
+	color: #ffffff;
+	border-radius: 50rpx;
+	border: none;
+	margin: 0 20rpx;
+}
+.bg-img,
+.logo-img-box {
+	position: absolute;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+}
+.logo-img {
+	margin-top: 20vh;
+	margin-left: 176rpx;
+	width: 385rpx;
+	height: 394rpx;
+}
+.userInfo {
+	margin: 0 100rpx;
+	margin-top: 50rpx;
+	color: #ffffff;
+	border-radius: 99rpx;
+	background-color: $base-color !important;
+}
+</style>

+ 208 - 0
pages/set/address.vue

@@ -0,0 +1,208 @@
+<template>
+	<view class="content b-t">
+		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
+			<view class="wrapper">
+				<view class="address-box">
+					<text class="name">{{ item.real_name }}</text>
+					<text class="mobile">{{ item.phone }}</text>
+				</view>
+				<view class="u-box">
+					<text class="address">{{ item.province + item.city + item.district }} {{ item.detail }}</text>
+				</view>
+			</view>
+			<view class="buttom">
+				<view class="default-buttom" @click.stop="defaultUp(item,index)">
+					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }"></view>
+					<text class="text">设为默认地址</text>
+				</view>
+				<view class="operation">
+					<view @click.stop="addAddress('edit', item)">
+						<text class="iconfont iconedit"></text>
+						<text class="text">编辑</text>
+					</view>
+					<view class="blank"></view>
+					<view @click.stop="delAddress(item)">
+						<text class="iconfont icondelete"></text>
+						<text class="text">删除</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<button class="add-btn" @click="addAddress('add')">新增地址</button>
+	</view>
+</template>
+
+<script>
+import { getAddressList,setAddressDefault,addressDel } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			source: 0,
+			addressList: []
+		};
+	},
+	onLoad(option) {
+		this.source = option.source||0
+		this.loadAddress();
+	},
+	methods: {
+		// 加载地址
+		loadAddress() {
+			getAddressList({
+				page: 1,
+				limit: 100
+			}).then(({ data }) => {
+				this.addressList = data;
+			});
+		},
+		// 设为默认地址
+		defaultUp(data,ind) {
+			this.addressList=this.addressList.map((e) => {
+				e.is_default=0
+				return e
+			})
+			this.addressList[ind].is_default=1
+			setAddressDefault({
+				id: data.id
+			}).then(({ data }) => {
+				this.loadAddress();
+			}).catch((e) => {
+				console.log(e);
+			});
+		},
+		//删除地址
+		delAddress(item) {
+			addressDel({
+				id:item.id
+			}).then(({data})=>{
+				this.$api.msg('删除成功')
+			})
+			let s = this.addressList.indexOf(item);
+			this.addressList.splice(s, 1);
+		},
+		//选择地址
+		checkAddress(item) {
+			if (this.source == 1) {
+				//this.$api.prePage()获取上一页实例,在App.vue定义
+				this.$api.prePage().addressData = item;
+				uni.navigateBack();
+			}
+		},
+		// 添加地址
+		addAddress(type, item) {
+			uni.navigateTo({
+				url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
+			});
+		},
+		//添加或修改成功之后回调
+		refreshList() {
+			// 重新加载地址
+			this.loadAddress()
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	padding-bottom: 120rpx;
+	padding-top: 20rpx;
+	background-color: $page-color-base;
+}
+.content {
+	position: relative;
+}
+.list {
+	align-items: center;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	margin: 20rpx;
+	margin-top: 0;
+	.buttom {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-top: 10rpx;
+		.checkbox {
+			font-size: 44rpx;
+			line-height: 1;
+			padding: 4rpx;
+			color: $font-color-disabled;
+			background: #fff;
+			border-radius: 50px;
+		}
+		.checkbox.checked {
+			color: $base-color;
+		}
+		.default-buttom {
+			display: flex;
+			align-items: center;
+		}
+		.operation {
+			display: flex;
+			align-items: center;
+			.blank {
+				width: 30rpx;
+			}
+		}
+		.text {
+			padding-left: 10rpx;
+			font-size: 24rpx;
+			color: #666666;
+		}
+	}
+}
+.wrapper {
+	display: flex;
+	flex-direction: column;
+	flex: 1;
+	border-bottom: 1px solid #f0f0f0;
+	padding-bottom: 20rpx;
+}
+.address-box {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	.address {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.mobile {
+		font-size: $font-base;
+		color: rgba(51, 51, 51, 1);
+	}
+}
+.u-box {
+	font-size: $font-base;
+	color: $font-color-light;
+	margin-top: 16rpx;
+	.name {
+		margin-right: 30rpx;
+	}
+}
+.icon-bianji {
+	display: flex;
+	align-items: center;
+	height: 80rpx;
+	font-size: 40rpx;
+	color: $font-color-light;
+	padding-left: 30rpx;
+}
+
+.add-btn {
+	position: fixed;
+	left: 30rpx;
+	right: 30rpx;
+	bottom: 16rpx;
+	z-index: 95;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+}
+</style>

+ 219 - 0
pages/set/addressManage.vue

@@ -0,0 +1,219 @@
+<template>
+	<view class="content">
+		<view class="row b-b">
+			<text class="tit">联系人</text>
+			<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">手机号</text>
+			<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">地址</text>
+			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
+			<text class="iconfont iconlocation"></text>
+		</view>
+		<view class="row b-b">
+			<text class="tit">门牌号</text>
+			<input class="input" type="text" v-model="addressData.area" placeholder="楼号、门牌" placeholder-class="placeholder" />
+		</view>
+
+		<uni-list class="margin-t-20">
+			<uni-list-item
+				title="设为默认"
+				:switch-checked="addressData.default"
+				:show-switch="true"
+				:show-arrow="false"
+				switch-color="#5dbc7c"
+				@switchChange="switchChange"
+			></uni-list-item>
+		</uni-list>
+
+		<button class="add-btn" @click="confirm">提交</button>
+	</view>
+</template>
+
+<script>
+import uniList from '@/components/uni-list/uni-list.vue';
+import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+import uniPopup from '@/components/uni-popup/uni-popup.vue';
+import  pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+import { addressEdit } from '@/api/user.js';
+export default {
+	components: {
+		uniList,
+		uniListItem,
+		pickerAddress,
+		uniPopup
+	},
+	data() {
+		return {
+			addressDetail: '',
+			addressData: {
+				name: '',
+				mobile: '',
+				address: {
+					province: '',
+					city: '',
+					district: ''
+				},
+				area: '',
+				default: false
+			}
+		};
+	},
+	onLoad(option) {
+		let title = '新增收货地址';
+		if (option.type === 'edit') {
+			title = '编辑收货地址';
+			let data = JSON.parse(option.data);
+			console.log(data);
+
+			this.addressData = {
+				name: data.real_name,
+				mobile: data.phone,
+				address: {
+					province: data.province,
+					city: data.city,
+					district: data.district
+				},
+				area: data.detail,
+				default: data.is_default == 1,
+				id: data.id
+			};
+			this.addressDetail = data.province + data.city + data.district;
+		}
+		this.manageType = option.type;
+		uni.setNavigationBarTitle({
+			title
+		});
+	},
+	methods: {
+		// 选中城市切换
+		onCityClick({data}) {
+			let address = this.addressData.address;
+			address.province = data[0];
+			address.city = data[1];
+			address.district = data[2];
+			this.addressDetail = data.join('');
+		},
+		//地图选择地址
+		chooseLocation() {
+			uni.chooseLocation({
+				success: data => {
+					console.log(data);
+					this.addressData.addressName = data.name;
+					this.addressData.address = data.name;
+				}
+			});
+		},
+		// 设置是否为默认地址
+		switchChange(e) {
+			this.addressData.default = e.value;
+		},
+		//提交
+		confirm() {
+			let obj = this;
+			let data = this.addressData;
+			if (!data.name) {
+				this.$api.msg('请填写收货人姓名');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
+				this.$api.msg('请输入正确的手机号码');
+				return;
+			}
+			if (!data.address) {
+				this.$api.msg('请在地图选择所在位置');
+				return;
+			}
+			if (!data.area) {
+				this.$api.msg('请填写门牌号信息');
+				return;
+			}
+
+			//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
+			addressEdit({
+				real_name: data.name,
+				phone: data.mobile,
+				address: {
+					province: data.address.province,
+					city: data.address.city,
+					district: data.address.district
+				},
+				detail: data.area,
+				is_default: data.default,
+				id: data.id||"",
+				type:1
+			}).then(function(e) {
+				obj.$api.prePage().refreshList();
+				uni.showToast({
+					title:'提交成功',
+					duration:2000
+				});
+				setTimeout(function() {
+					uni.navigateBack();
+				}, 800);
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+	padding-top: 16rpx;
+}
+
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.default-row {
+	margin-top: 16rpx;
+	.tit {
+		flex: 1;
+	}
+	switch {
+		transform: translateX(16rpx) scale(0.9);
+	}
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.alert-box {
+	background-color: #ffffff;
+}
+</style>

+ 161 - 0
pages/set/password.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="container">
+		<view class="row b-b">
+			<text class="tit">手机号</text>
+			<input class="input" v-model="account" type="text" placeholder="请填写手机号" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">验证码</text>
+			<input class="input" v-model="captcha" type="text" placeholder="请填写验证码" placeholder-class="placeholder" />
+			<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+		</view>
+		<view class="row b-b">
+			<text class="tit">新密码</text>
+			<input class="input" v-model="password" type="password" placeholder="请填写新密码" placeholder-class="placeholder" />
+		</view>
+		<button class="add-btn" :class="{'bg-gray':loding}" @click="loding?'':confirm()">提交</button>
+	</view>
+</template>
+
+<script>
+import { verify } from '@/api/login.js';
+import { mapState } from 'vuex';
+import { registerReset } from '@/api/set.js';
+export default {
+	data() {
+		return {
+			time: '', //保存倒计时对象
+			countDown: 0, //倒计时
+			account: '', //手机号
+			captcha: '', //验证码
+			password: '' ,//新密码
+			loding:false,//是否载入中
+		};
+	},
+	computed: {
+		...mapState(['userInfo'])
+	},
+	onLoad() {
+		if(this.userInfo.phone == null){
+			this.account = '';
+		}else{
+			this.account = this.userInfo.phone;
+			this.show = false;
+		}
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.account == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.account,
+					type: ''
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		confirm(e) {
+			this.loding = true;
+			registerReset({
+				account: this.account,
+				captcha: this.captcha,
+				password: this.password,
+			})
+				.then(({ data }) => {
+					this.loding = false;
+					this.$api.msg('修改成功');
+				})
+				.catch(err => {
+					this.loding = false;
+					console.log(err);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+}
+.container {
+	padding-top: 30rpx;
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.bg-gray{
+	background-color: $color-gray;
+}
+.code {
+	color: #5dbc7c;
+	font-size: 23rpx;
+	border-left: 1px solid #eeeeee;
+	width: 150rpx;
+	flex-shrink: 0;
+	text-align: center;
+}
+</style>

+ 161 - 0
pages/set/phone.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="container">
+		<view class="row b-b">
+			<text class="tit">手机号</text>
+			<input class="input" v-model="account" type="text" placeholder="请填写手机号" placeholder-class="placeholder" />
+		</view>
+		<view>
+			<view class="row b-b">
+				<text class="tit">验证码</text>
+				<input class="input" v-model="captcha" type="text" placeholder="请填写验证码" placeholder-class="placeholder" />
+				<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+			</view>
+			<button class="add-btn" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</button>
+		</view>
+	</view>
+</template>
+
+<script>
+import { verify } from '@/api/login.js';
+import { mapState } from 'vuex';
+import { registerReset, binding } from '@/api/set.js';
+export default {
+	data() {
+		return {
+			time: '', //保存倒计时对象
+			countDown: 0, //倒计时
+			account: '', //手机号
+			captcha: '', //验证码
+			password: '', //新密码
+			loding: false //是否载入中
+		};
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	computed: {
+		...mapState(['userInfo'])
+	},
+	onLoad() {
+		if (this.userInfo.phone == null) {
+			this.account = '';
+		} else {
+			this.account = this.userInfo.phone;
+			this.show = false;
+		}
+	},
+	methods: {
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.account == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.account,
+					type: 'BDING_CODE'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		confirm(e) {
+			let obj = this;
+			obj.loding = true;
+			binding({
+				phone: obj.account,
+				captcha: obj.captcha
+			})
+				.then(({ data }) => {
+					obj.$api.msg('绑定成功!');
+					setTimeout(function() {
+						obj.loding = false;
+						uni.switchTab({
+							url: '/pages/user/user'
+						});
+					}, 1000);
+				})
+				.catch(err => {
+					obj.loding = false;
+					console.log(err);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.bg-gray {
+	background-color: $color-gray;
+}
+.code {
+	color: #5dbc7c;
+	font-size: 23rpx;
+	border-left: 1px solid #eeeeee;
+	width: 150rpx;
+	flex-shrink: 0;
+	text-align: center;
+}
+</style>

+ 113 - 0
pages/set/set.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="container">
+		<uni-list>
+		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
+			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
+		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
+		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
+		</uni-list>
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
+			</uni-list-item>
+		</uni-list>
+		
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="清除缓存" ></uni-list-item>
+		    <uni-list-item title="检查更新" >
+				<template slot="right">
+					当前版本 1.0.3
+				</template>
+			</uni-list-item>
+		</uni-list>
+		<view class="list-cell log-out-btn" @click="toLogout">
+			<text class="cell-tit">退出登录</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniList from "@/components/uni-list/uni-list.vue"
+	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
+	import { logout } from '@/api/set.js';
+	import {  
+	    mapMutations  
+	} from 'vuex';
+	export default {
+		components: {
+			uniList,uniListItem
+		},
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			...mapMutations('user',['logout']),
+			navTo(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			//退出登录
+			toLogout(){
+				let obj = this;
+				uni.showModal({
+				    content: '确定要退出登录么',
+				    success: (e)=>{
+				    	if(e.confirm){
+							logout({}).then((e) => {
+								uni.navigateBack();
+							}).catch((e) => {
+								console.log(e);
+							})
+				    		obj.logout();
+				    	}
+				    }
+				});
+			},
+			//switch切换触发方法
+			switchChange(e){
+				console.log(e);
+				let statusTip = e.value ? '打开': '关闭';
+				this.$api.msg(`${statusTip}消息推送`);
+			},
+
+		}
+	}
+</script>
+
+<style lang='scss'>
+	page{
+		background: $page-color-base;
+	}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	}
+</style>

+ 204 - 0
pages/set/userinfo.vue

@@ -0,0 +1,204 @@
+<template>
+<!-- 	<view class="container">
+		<uni-list>
+		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
+			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
+		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
+		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
+		</uni-list>
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
+			</uni-list-item>
+		</uni-list>
+		
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="清除缓存" ></uni-list-item>
+		    <uni-list-item title="检查更新" >
+				<template slot="right">
+					当前版本 1.0.3
+				</template>
+			</uni-list-item>
+		</uni-list>
+		<view class="list-cell log-out-btn" @click="toLogout">
+			<text class="cell-tit">退出登录</text>
+		</view>
+	</view> -->
+  <view class="container">
+  	<view class="row b-b flex jg">
+  		<text class="tit">头像</text>
+  		<image :src="userInfo.avatar" @click.stop="imgsub"></image>
+  	</view>
+  	<view class="row b-b flex">
+  		<text class="tit">昵称</text>
+  		<input class="input" v-model="userInfo.nickname" type="text" placeholder-class="placeholder" />
+  	</view>
+  	<view class="row b-b flex">
+  		<text class="tit">邀请码</text>
+  		<input class="input" v-model="userInfo.uid" type="text" disabled="true" placeholder-class="placeholder" style="color: #999;" />
+  	</view>
+  	<view class="row b-b flex" v-if="userInfo.account || userInfo.phone">
+  		<text class="tit">用户账号</text>
+  		<input class="input" v-model="userInfo.account || userInfo.phone" type="number" disabled="true" placeholder-class="placeholder" />
+  	</view>
+  	<view class="submit-box flex" >
+  		<view class="submit" @click="edit">确认修改</view>
+  		<view class="submit" @click="toLogout">退出登录</view>
+  	</view>
+  	
+  </view>
+</template>
+
+<script>
+  import uniList from '@/components/uni-list/uni-list.vue';
+  import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+  import { mapState, mapMutations } from 'vuex';
+  import { logout } from '@/api/set.js';
+
+  import {
+  		uploads,edit,upload
+  	} from '@/api/user.js';
+  export default {
+  	components: {
+  		uniList,
+  		uniListItem
+  	},
+  	data() {
+  		return {
+  			userInfo:{},
+			pics:[],
+  		};
+  	},
+  	onLoad() {
+		this.userInfo = uni.getStorageSync('userInfo') || '';
+		console.log(this.userInfo)
+  	},
+  	methods: {
+  		...mapMutations('user',['logout']),
+  		//退出登录
+  		toLogout() {
+  			let obj = this;
+  			uni.showModal({
+  				content: '确定要退出登录么',
+  				success: e => {
+  					if (e.confirm) {
+  						logout({}).then(e => {
+  							obj.logout();
+  							uni.navigateTo({
+  								url:'/pages/public/login'
+  							})
+  						})
+  						.catch(e => {
+  							console.log(e);
+  						});
+  					}
+  				}
+  			});
+  		},
+  		imgsub() {
+			let obj = this
+			upload({
+				filename: ''
+			}).then(res => {
+				console.log(res[0].url)
+				obj.userInfo.avatar = res[0].url
+			});
+  		},
+  		edit() {
+  			const that = this;
+			uni.showLoading({
+				title: '提交中...',
+				mask:true
+			})
+  			edit({
+  				avatar: this.userInfo.avatar,
+  				nickname: this.userInfo.nickname
+  			}).then( e =>{
+				uni.hideLoading()
+  				that.$api.msg('修改成功');
+  				setTimeout(()=> {
+  					uni.switchTab({
+  						url:'/pages/user/user'
+  					});
+  				}, 1000);
+  			}).catch(e =>{
+  				console.log(e);
+  				that.$api.msg('修改失败');
+  			})
+  		}
+  	}
+  };
+</script>
+
+<style lang='scss'>
+	/* page{
+		background: $page-color-base;
+	}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	} */
+  page {
+    background-color: #f3f3f3;
+  	min-height: 100%;
+  	.container{
+  		height: 100%;
+  		
+  	}
+  }
+  .row {
+    background-color: #fff;
+  	padding: 42rpx 25rpx;
+  	font-size: 30rpx;
+  	color: #333333;
+  	image{
+  		width: 80rpx;
+  		height: 80rpx;
+  		border-radius: 50%;
+  	}
+  	.input {
+  		text-align: right;
+  		color: #333333;
+  	}
+  }
+  .submit-box{
+  		 padding-top: 157rpx;
+  		.submit{
+  			margin: 40rpx auto;
+  			width: 560rpx;
+  			background-color: #ff4c4b;
+  			color: #FFFFFF;
+  			text-align: center;
+  			padding:26rpx 0rpx;
+  			border-radius: 50rpx;
+  		}
+  	}
+    .jg {
+      margin-bottom: 20rpx;
+    }
+</style>

+ 275 - 7
pages/story/story.vue

@@ -1,8 +1,276 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
+<template>
+	<view class="content">
+		<!-- 头部导航 -->
+		<view class="nav-bar flex">
+			<view class="nav-item" v-for="(item,index) in navList" :key="index"
+				:class="{'active': currentIndex == index}" @click="navClick(index)">
+				{{item.tit}}
+			</view>
+		</view>
+		<!-- 分类列表 -->
+		<swiper :duration="400" class="swiper-wrapper" :style="{'height': height}" :current="currentIndex"
+			@change="swiperChange">
+			<swiper-item v-for="(navitem,navindex) in navList">
+				<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrapper">
+					<view class="list" v-for="(item,index) in navitem.list"
+						@click="navTo('/pages/story/storyDetail?id=' + item.id)">
+						<template v-if="index == 0">
+							<view class="list-top-tit clamp2">{{item.title}}</view>
+							<image :src="item.image_input[0]" mode="" class="list-top-img"></image>
+							<view class="list-top-time">
+								更新时间: {{item.add_time}}
+							</view>
+						</template>
+						<template v-else>
+							<view class="list-scend">
+								<image :src="item.image_input[0]" mode="" class="list-img"></image>
+								<view class="list-info">
+									<view class="list-tit clamp">{{item.title}}</view>
+									<view class="list-time">
+										更新时间: {{item.add_time}}
+									</view>
+								</view>
+							</view>
+						</template>
+					</view>
+					<uni-load-more :status="navitem.loadingType" v-if="navitem.loaded"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import {
+		article,
+		details
+	} from '@/api/index.js'
+	export default {
+		components: {
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-wrapper').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '', //swiper 高度
+				currentIndex: 0, //当前头部导航位置
+				navList: [{
+						cid: 1,
+						tit: '公司简介',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					},
+					{
+						cid: 2,
+						tit: '产品简介',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					},
+					{
+						cid: 3,
+						tit: '案例分享',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					}
+				]
+			}
+		},
+		onLoad() {
+			this.getData('tabChange')
+		},
+		methods: {
+			//跳转详情
+			navTo(url) {
+				console.log(url)
+				uni.navigateTo({
+					url: url
+				})
+			},
+			navClick(index) {
+				this.currentIndex = index
+			},
+			swiperChange(e) {
+				console.log(e, 'swiperChange')
+				this.currentIndex = e.detail.current
+				this.getData('tabChange')
+			},
+			getData(source) {
+				let obj = this
+				let index = this.currentIndex;
+				let navItem = this.navList[index];
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				if (source == 'tabChange') {
+					uni.showLoading({
+						title: "加载中...",
+						mask: true
+					})
+				}
+				navItem.loadingType = 'loading';
+				article({
+					page: navItem.page,
+					limit: navItem.limit
+				}, navItem.cid).then(({
+					data
+				}) => {
+					if (source == 'tabChange' && navItem.loaded != false) {
+						uni.hideLoading()
+					}
+					console.log(data)
+					let list = data.map(item => {
+						return item
+					})
+					navItem.list = navItem.list.concat(list);
+
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						navItem.page++;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					this.$set(navItem, 'loaded', true);
+
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #eee;
+		padding-top: 20rpx;
+	}
+
+	.content {
+		height: 100%;
+
+		background-color: #fff;
+
+		.nav-bar {
+			line-height: 86rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			justify-content: space-around;
+			border-bottom: #E0E0E0 1px solid;
+
+			.active {
+				color: #3F7C1F;
+				border-bottom: 3rpx solid #3F7C1F;
+			}
+
+			.nav-item {
+				// flex-grow: 1;
+				text-align: center;
+			}
+		}
+	}
+
+	.swiper-wrapper {
+		background-color: #fff;
+
+		.scroll-wrapper {
+			padding: 0 22rpx 0 23rpx;
+		}
+
+		.list {
+			padding: 18rpx 0;
+			border-bottom: 1px solid #E0E0E0;
+
+			.list-top-tit {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+				line-height: 42rpx;
+			}
+
+			.list-top-img {
+				margin-top: 15rpx;
+				width: 705rpx;
+				height: 399rpx;
+				background-color: #999;
+			}
+
+			.list-top-time {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 32rpx;
+			}
+
+			.list-scend {
+				display: flex;
+
+				.list-img {
+					flex-shrink: 0;
+					background-color: #999;
+					width: 224rpx;
+					height: 160rpx;
+				}
+
+				.list-info {
+					padding: 10rpx 0 19rpx 23rpx;
+					position: relative;
+
+					.list-tit {
+						width: 420rpx;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+						line-height: 32px;
+					}
+
+					.list-time {
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 32rpx;
+						position: absolute;
+						bottom: 19rpx;
+					}
+				}
+
+			}
+		}
+	}
 </style>

+ 126 - 0
pages/story/storyDetail.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="content" >
+		<template v-if="detail">
+			<view class="top">
+				<image :src="detail.image_input[0]" mode=""></image>
+			</view>
+			<view class="detail">
+				<view class="detail-top">
+					<view class="tit">
+						{{detail.title}}
+					</view>
+					<view class="time">
+						更新时间: {{detail.add_time}}
+					</view>
+				</view>
+				<view class="jg">
+				</view>
+				<view class="detail-content" v-html="detail.content">
+				</view>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+	import {article,details} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				content: '',
+				detail: '',
+			}
+			
+		},
+		onLoad(opt) {
+			if(opt.id) {
+				this.getDetail(opt.id)
+			}
+		},
+		methods: {
+			getDetail(id) {
+				let obj = this
+				uni.showLoading({
+					title: '加载中...'
+				})
+				details({},id).then( ({data}) => {
+					uni.hideLoading()
+					console.log(data)
+					data.content = data.content.replace(/\<img/gi, '<img class="rich-img"')
+					this.detail = data
+					// obj.content = res.data.content
+					// obj.detail = res.data
+				}).catch(err => {
+					console.log(err)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+	}
+	.content {
+		background-color: #fff;
+		height: 100%;
+		.top {
+			width: 750rpx;
+			height: 668rpx;
+			image {
+				width: 100%;
+				height: 100%;
+				background-color: #999;
+			}
+		}
+		.detail {
+			position: relative;
+			top: -57rpx;
+			.jg {
+				width: 670rpx;
+				height: 2rpx;
+				background: #F5F5F5;
+				margin: auto;
+			}
+			.detail-top {
+				min-height: 190rpx;
+				padding: 57rpx 40rpx 40rpx;
+				background-color: #fff;
+				border-radius: 30rpx 30rpx 0 0;
+				.tit {
+					font-size: 48rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 51rpx;
+				}
+				.time {
+					padding-top: 10rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999;
+					line-height: 51rpx;
+				}
+			}
+			.detail-content {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				line-height: 48rpx;
+				padding: 37rpx 40rpx;
+				width: 750rpx;
+				
+				// * {
+				// 	max-width: 100%;
+				// }
+				
+			}
+		}
+	}
+	.rich-img {
+		width: 100% !important;
+	}
+</style>

+ 8 - 39
pages/user/accounts.vue

@@ -3,11 +3,6 @@
 		<!-- 头部 -->
 		<view class="header">
 			<image src="../../static/img/img33.png" mode="scaleToFill"></image>
-			<!-- 我的佣金 -->
-			<view class="yongjin">
-				<image src="../../static/img/xiangzuo.png" mode="scaleToFill" @click.stop="back()"></image>
-				<view class="text">我的佣金</view>
-			</view>
 			<!-- 佣金转账 -->
 			<view class="accounts" @click="nav('/pages/user/transfer')">
 				<view class="text">佣金转账</view>
@@ -83,14 +78,14 @@
 					url
 				})
 			},
-			back(){
-				uni.navigateBack({
-					delta:1
-				})
-			},
-			handclick () {
-				console.log(123)
-			},
+			// back(){
+			// 	uni.navigateBack({
+			// 		delta:1
+			// 	})
+			// },
+			// handclick () {
+			// 	console.log(123)
+			// },
 			//swiper 切换
 			changeTab(e) {
 				this.tabCurrentIndex = e.target.current;
@@ -112,37 +107,11 @@
 
 		.header {
 			position: relative;
-
 			image {
 				width: 750rpx;
 				height: 400rpx;
 			}
 
-			.yongjin {
-				// background-color: pink;
-				padding-top: 50rpx;
-				width: 100%;
-				position: absolute;
-				z-index: 10;
-				top: 0;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-
-				image {
-					width: 20rpx;
-					height: 37rpx;
-					margin-left: 30rpx;
-				}
-				
-				.text {
-					font-size: 36rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #333333;
-					margin-right: 300rpx;
-				}
-			}
 		}
 		
 		.accounts {

+ 235 - 0
pages/user/extend.vue

@@ -0,0 +1,235 @@
+<template>
+	<view class="container">
+		<view class="header">
+			<image src="../../static/img/img39.png" mode="scaleToFill"></image>
+				<view class="counts">385<text>人</text></view>
+				<view class="people">我的推广人数</view>
+		</view>
+		<!-- 推广 -->
+		<view class="navbar">
+			<view class="one">5</view>
+			<view class="line"></view>
+			<view class="two">120</view>
+			<view class="nav-item" v-for="(item, index) in navList" :key="index"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper class="swiper-box" :current="tabCurrentIndex" duration="300" @change="changeTab"
+			>
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<!-- 空白页 -->
+				<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
+				<!-- 推广奖励 -->
+				<scroll-view class="scorll" scroll-y="true" >
+					<view class="cost">
+						<view class="award" v-for="item in 10">
+							<image src="../../static/tabBar/tab-my-current.png" mode="scaleToFill"></image>
+							<view class="award-left">
+								<view class="text">xxx</view>
+								<view class="time">2021-8-26 09:30</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+		
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+export default {
+	data () {
+		return {
+			height: '',
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 1,
+						text: '一级推广',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 2,
+						text: '二级推广',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				list: [],
+				money: ''
+		}
+	},
+	methods: {
+		//swiper 切换
+		changeTab (e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange')
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+	.container {
+		width: 750rpx;
+		height: 1334rpx;
+		background-color: #fff;
+	
+		.header {
+			position: relative;
+			image {
+				width: 750rpx;
+				height: 460rpx;
+			}
+			.counts {
+				font-size: 72rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #3F7C1F;
+				position: absolute;
+				top: 35%;
+				margin-left: 310rpx;
+				text {
+					font-size: 12rpx;
+				}
+			}
+			.people {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+				position: absolute;
+				top: 55%;
+				margin-left: 286rpx;
+			}
+		}
+	
+		.swiper-box {
+			height: calc(100% - 700rpx);
+			background-color: #FFFFFF;
+		}
+		.scorll {
+			height: 100%;
+		}
+		.navbar {
+			display: flex;
+			padding: 0 5rpx;
+			background: #fff;
+			position: relative;
+			z-index: 10;
+			width: 702rpx;
+			height: 120rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			margin-top: -70rpx;
+			margin-left: 25rpx;
+			.one {
+				position: absolute;
+				top: 10%;
+				left: 25%;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF0000;
+			}
+			.two {
+				position: absolute;
+				top: 10%;
+				left: 70%;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF0000;
+			}
+			.line {
+				width: 2rpx;
+				height: 54rpx;
+				background: #EEEEEE;
+				position: absolute;
+				top: 30%;
+				left: 50%;
+			}
+	
+			.nav-item {
+				flex: 1;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				height: 100%;
+				font-size: 30rpx;
+				color: #999999;
+				position: relative;
+				padding-top: 40rpx;
+	
+				&.current {
+					color: #333333;
+	
+					&:after {
+						content: '';
+						position: absolute;
+						left: 50%;
+						bottom: 0;
+						transform: translateX(-50%);
+						width: 44px;
+						height: 0;
+						border-bottom: 2px solid #3F7C1F;
+					}
+				}
+			}
+		}
+	
+		.cost {
+			width: 750rpx;
+			height: auto;
+			background-color: #fff;
+	
+			.award {
+				width: 701rpx;
+				height: 132rpx;
+				border-bottom: 1px solid #F0F4F8;
+				margin-left: 25rpx;
+				display: flex;
+				align-items: center;
+				image {
+					width: 80rpx;
+					height: 80rpx;
+				}
+	
+				.award-left {
+					width: 221rpx;
+					height: 40rpx;
+					margin-left: 30rpx;
+					margin-bottom: 35rpx;
+	
+					.text {
+						width: 58rpx;
+						height: 28rpx;
+						font-size: 30rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #3F454B;
+						margin-bottom: 16rpx;
+					}
+	
+					.time {
+						width: 221rpx;
+						height: 20rpx;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #AEAEAE;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 192 - 0
pages/user/integral.vue

@@ -0,0 +1,192 @@
+<template>
+	<view class="container">
+		<!-- 头部 -->
+		<view class="header">
+			<image src="../../static/img/img38.png" mode="scaleToFill"></image>
+			<view class="money">3852</view>
+		</view>
+		<!-- 收入和支出 -->
+		<view class="navbar">
+			<view class="nav-item" v-for="(item, index) in navList" :key="index"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		
+		</view>
+		<swiper class="swiper-box" :current="tabCurrentIndex" duration="300" @change="changeTab"
+			>
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<!-- 空白页 -->
+				<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
+				<!-- 推广奖励 -->
+				<scroll-view class="scorll" scroll-y="true" >
+					<view class="cost">
+						<view class="award" v-for="item in 10">
+							<view class="award-left">
+								<view class="text">消费赠送</view>
+								<view class="time">2021-8-26 09:30</view>
+							</view>
+							<view class="award-right">+200</view>
+						</view>
+					</view>
+				</scroll-view>
+		
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+export default {
+	data () {
+		return {
+			height: '',
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 2,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				list: [],
+				money: ''
+		}
+	},
+	methods: {
+		//swiper 切换
+		changeTab (e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange')
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+	.container {
+		width: 750rpx;
+		height: 1334rpx;
+		background-color: #f1f1f1;
+		.header {
+			image {
+				width: 750rpx;
+				height: 400rpx;
+			}
+			.money {
+				font-size: 72rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+				top: 15%;
+				position: absolute;
+				left: 50%;
+				transform: translate(-50%);
+			}
+		}
+		.swiper-box {
+			height: calc(100% - 500rpx);
+			background-color: #FFFFFF;
+		}
+		.scorll {
+			height: 90%;
+		}
+		.navbar {
+			display: flex;
+			height: 100rpx;
+			padding: 0 5rpx;
+			background: #fff;
+			box-shadow: 0 1rpx 5rpx rgba(0, 0, 0, 0.06);
+			position: relative;
+			z-index: 10;
+			margin-top: 25rpx;
+		
+			.nav-item {
+				flex: 1;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				height: 100%;
+				font-size: 15px;
+				color: #999999;
+				position: relative;
+		
+				&.current {
+					color: #333333;
+		
+					&:after {
+						content: '';
+						position: absolute;
+						left: 50%;
+						bottom: 0;
+						transform: translateX(-50%);
+						width: 44px;
+						height: 0;
+						border-bottom: 2px solid #3F7C1F;
+					}
+				}
+			}
+		}
+		.cost {
+			width: 750rpx;
+			height: auto;
+			background-color: #fff;
+		
+			.award {
+				width: 701rpx;
+				height: 132rpx;
+				border-bottom: 1px solid #F0F4F8;
+				margin-left: 25rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+		
+				.award-left {
+					width: 221rpx;
+					height: 40rpx;
+					margin-left: 30rpx;
+					margin-bottom: 35rpx;
+		
+					.text {
+						width: 182rpx;
+						height: 30rpx;
+						font-size: 30rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #666666;
+						margin-bottom: 16rpx;
+					}
+		
+					.time {
+						width: 221rpx;
+						height: 20rpx;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #AEAEAE;
+					}
+				}
+		
+				.award-right {
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FF0000;
+					margin-right: 30rpx;
+				}
+			}
+		}
+	}
+</style>

+ 358 - 0
pages/user/jiedian.vue

@@ -0,0 +1,358 @@
+<template>
+	<view class="content">
+		<!-- 头部 -->
+		
+		<view class="container">
+			<view class="jiedianbackground">
+				<image src="../../static/image/jiedian.png" mode=""></image>
+			</view>
+			<view class="number-box">
+				<view class="number">
+					<text>{{people}}</text>人
+				</view>
+				<view class="renshu">
+					我的接点人数
+				</view>
+			</view>
+		</view>
+		<view class="message">
+			<view class="yeji">
+				<view class="yeji-a">
+					<view class="yeji-top">
+						A区业绩
+					</view>
+					<view class="yeji-buttom">¥{{a}}</view>
+				</view>
+				<view class="border"></view>
+				<view class="yeji-a">
+					<view class="yeji-top">
+						B区业绩
+					</view>
+					<view class="yeji-buttom">¥{{b}}</view>
+				</view>
+				<view class="border"></view>
+				<view class="yeji-a">
+					<view class="yeji-top">
+						C区业绩
+					</view>
+					<view class="yeji-buttom">¥{{c}}</view>
+				</view>
+			</view>
+			<view class="relation-box">
+				<view class="relation">
+					<view class="headbox">
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="information">
+						<view class="name">
+							徐浩岚
+						</view>
+						<view class="cell">
+							18252757278
+						</view>
+					</view>
+				</view>
+				<view class="sanchaji">
+					<image src="../../static/image/sanchaji.png" mode=""></image>
+				</view>
+				<view class="subordinate">
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				a: 1,
+				b: 2,
+				c: 3,
+				people: 255,
+				manList:''
+			}
+		},
+		methods: {}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		padding: 0;
+		margin: 0;
+		height: 100%;
+		background-color: #FFFFFF;
+	}
+
+	.content {}
+
+	.container {
+		width: 750rpx;
+		height: 400rpx;
+		position: relative;
+
+		.jiedianbackground {
+			position: absolute;
+			width: 750rpx;
+			height: 400rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.number-box {
+			width: 750rpx;
+			height: 400rpx;
+			position: absolute;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+
+			.number {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+
+				text {
+					font-size: 72rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #3F7C1F;
+					line-height: 86rpx;
+				}
+			}
+
+			.renshu {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+			}
+		}
+	}
+
+	.message {
+		padding: 0 30rpx;
+
+		.relation-box {
+			margin-top: 100rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.relation {
+				position: relative;
+				display: flex;
+				align-items: center;
+				
+
+				.headbox {
+
+					position: absolute;
+					width: 154rpx;
+					height: 154rpx;
+
+					.head {
+						width: 154rpx;
+						height: 154rpx;
+						background: #EF9E20;
+						box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
+						border-radius: 50%;
+						overflow: hidden;
+
+						.photo {
+							width: 154rpx;
+							height: 154rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+					}
+
+					.head-title {
+						margin: -30rpx 30rpx 0 30rpx;
+						width: 94rpx;
+						height: 32rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+
+				.information {
+					margin-left: 77rpx;
+					display: flex;
+					justify-content: center;
+					flex-direction: column;
+					width: 297rpx;
+					height: 137rpx;
+					align-items: center;
+					background: #FFFFFF;
+					border: 4rpx solid #6EAB4E;
+					border-radius: 10rpx;
+
+					.name {
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #3F7C1F;
+						line-height: 48rpx;
+					}
+
+					.cell {
+						margin-left: 70rpx;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #ABD56F;
+						line-height: 48rpx;
+					}
+				}
+
+
+			}
+
+			.sanchaji {
+				margin: 30rpx 0;
+				width: 530rpx;
+				height: 91rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.subordinate {
+				width: 750rpx;
+				display: flex;
+				justify-content: space-around;
+					.headbox {
+						
+						width: 154rpx;
+						height: 154rpx;
+
+						.head {
+							width: 154rpx;
+							height: 154rpx;
+							background: #EF9E20;
+							box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
+							border-radius: 50%;
+							overflow: hidden;
+
+							.photo {
+								width: 154rpx;
+								height: 154rpx;
+
+								image {
+									width: 100%;
+									height: 100%;
+								}
+							}
+						}
+
+						.head-title {
+							margin: -30rpx 30rpx 0 30rpx;
+							width: 94rpx;
+							height: 32rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+					
+				}
+			}
+		}
+
+		.yeji {
+			position: relative;
+			margin-top: -72rpx;
+			width: 690rpx;
+			height: 143rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+
+			.yeji-a {
+				display: flex;
+				flex-direction: column;
+				justify-content: space-around;
+				align-items: center;
+
+				.yeji-top {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					line-height: 35px;
+				}
+
+				.yeji-buttom {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					line-height: 35px;
+				}
+			}
+
+			.border {
+				width: 1rpx;
+				height: 51rpx;
+				background: #DDDDDD;
+			}
+		}
+	}
+</style>

+ 72 - 0
pages/user/refer.vue

@@ -0,0 +1,72 @@
+<template>
+	<view class="container">
+			<image src="../../static/img/img34.png" mode="scaleToFill"></image>
+			<view class="text">提交成功</view>
+			<view class="shenhe">请耐心等待审核</view>
+			<view class="btm">
+				<view class="btn">返回首页</view>
+			</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data () {
+		return {}
+	},
+	methods: {}
+}
+</script>
+
+<style lang="scss">
+	.container {
+		background-color: #fff;
+		width: 750rpx;
+		height: 1334rpx;
+		
+		image {
+			width: 300rpx;
+			height: 250rpx;
+			margin-top: 200rpx;
+			margin-left: 210rpx;
+		}
+		
+		.text {
+			font-size: 40rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			line-height: 40rpx;
+			padding-left: 300rpx;
+		}
+		
+		.shenhe {
+			font-size: 27rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #B3B3B3;
+			margin-top: 20rpx;
+			display: flex;
+			justify-content: center;
+		}
+		
+		.btm {
+			width: 350rpx;
+			height: 80rpx;
+			background: #6EAB4E;
+			border-radius: 40rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			margin-left: 200rpx;
+			margin-top: 50rpx;
+			
+			.btn {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 162 - 0
pages/user/shezhi.vue

@@ -0,0 +1,162 @@
+<template>
+	<view class="container">
+		<!-- 头像 -->
+		<view class="touxiang">
+			<view class="tou">头像</view>
+			<view class="avatar"><image :src=" userInfo.avatar || '../../static/error/missing-face.png' "></image></view>
+		</view>
+		<!-- 昵称 -->
+		<view class="nicheng">
+			<view class="text">昵称</view>
+				<view class="username">{{ userInfo.nickname || '游客' }}</view>
+		</view>
+		<view class="yaoqing">
+			<view class="ma">邀请码</view>
+			<view class="shu">102320</view>
+			</view>
+			<view class="zhanghu">
+				<view class="qq">账户</view>
+				<view class="number">13911111111</view>
+				</view>
+			<view class="btn"><text>退出登录</text></view>
+	</view>
+</template>
+
+<script>
+import { edit } from '@/api/user'
+export default {
+	data () {
+		return {
+			userInfo: {}
+		}
+	},
+	created () {
+		this.loadUser ()
+	},
+	methods: {
+		nav (url) {
+			uni.navigateTo({
+				url
+			})
+		},
+		
+		async loadUser () {
+			const { data } = await edit ()
+			console.log(data)
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+	.container {
+		background-color: #F2F3F5;
+		width: 750rpx;
+		height: 1334rpx;
+		.touxiang {
+			height: 120rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			.tou {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.avatar {
+				image {
+					width: 80rpx;
+					height: 80rpx;
+					border-radius: 50%;
+					margin-right: 25rpx;
+				}
+			}
+		}
+		.nicheng {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			border-bottom: 1rpx solid #F0F0F0;
+			margin-top: 20rpx;
+			.text {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.username {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.yaoqing {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			border-bottom: 1rpx solid #F0F0F0;
+			.ma {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.shu {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.zhanghu {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			background-color: #fff;
+			.qq {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-left: 25rpx;
+			}
+			.number {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				margin-right: 25rpx;
+			}
+		}
+		.btn {
+			width: 560rpx;
+			height: 80rpx;
+			background: #6EAB4E;
+			border-radius: 40rpx;
+			margin-top: 157rpx;
+			margin-left: 95rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			text {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 8 - 2
pages/user/submit.vue

@@ -3,7 +3,7 @@
 			<image class="img" src="../../static/img/img34.png" mode="scaleToFill"></image>
 			<view class="text">提交成功</view>
 			<view class="btm">
-				<view class="btn">返回首页</view>
+				<view class="btn" @click="nav('pages/index/index')">返回首页</view>
 			</view>
 	</view>
 </template>
@@ -13,7 +13,13 @@ export default {
 	data () {
 		return {}
 	},
-	methods: {}
+	methods: {
+		nav (url) {
+			uni.navigateTo({
+				url
+			})
+		} 
+	}
 }
 </script>
 

+ 389 - 175
pages/user/user.vue

@@ -8,39 +8,39 @@
 			<view class="infor">
 				<!-- 用户信息 -->
 				<view class="infor-left">
-					<image src="../../static/error/missing-face.png" mode=""></image>
+					<image :src=" userInfo.avatar || '../../static/error/missing-face.png' "></image>
 					<view class="info-box">
-						<view class="username">李丹丹</view>
-							<view class="phone">13911111111</view>
-						</view>
+						<view class="username">{{ userInfo.nickname || '游客' }}</view>
+						<view class="phone">{{userInfo.phone}}</view>
+					</view>
 				</view>
 				<!-- 设置 -->
-				<view class="infor-right">
+				<view class="infor-right" @click="nav('/pages/user/shezhi')">
 					<image src="../../static/img/img18.png" mode="scaleToFill"></image>
 					<view class="setting">设置</view>
 				</view>
 			</view>
 			<!-- 我的订单 -->
 			<view class="order-box">
-				<view class="my-order">
+				<view class="my-order" @click="nav('/pages/order/order')">
 					<view class="order">我的订单</view>
 					<image src="../../static/img/xiangxia.png" mode="scaleToFill"></image>
 				</view>
 				<!-- 订单栏 -->
 				<view class="order-section">
-					<view class="order-item">
+					<view class="order-item" @click="nav('/pages/order/order?state=1')">
 						<image src="../../static/img/img19.png" mode="scaleToFill"></image>
 						<view class="text">待付款</view>
 					</view>
-					<view class="order-item">
+					<view class="order-item" @click="nav('/pages/order/order?state=2')">
 						<image src="../../static/img/img20.png" mode="scaleToFill"></image>
 						<view class="text">待发货</view>
 					</view>
-					<view class="order-item">
+					<view class="order-item" @click="nav('/pages/order/order?state=3')">
 						<image src="../../static/img/img21.png" mode="scaleToFill"></image>
-						<view class="text">待收</view>
+						<view class="text">待收</view>
 					</view>
-					<view class="order-item">
+					<view class="order-item" @click="nav('/pages/order/order?state=4')">
 						<image src="../../static/img/img22.png" mode="scaleToFill"></image>
 						<view class="text">已完成</view>
 					</view>
@@ -51,7 +51,7 @@
 		<view class="item-box">
 			<!-- 我的余额 -->
 			<view class="order-section">
-				<view class="order-item">
+				<view class="order-item" @click="nav('/pages/money/wallet')">
 					<image src="../../static/img/img26.png" mode="scaleToFill"></image>
 					<view class="text">我的余额</view>
 				</view>
@@ -59,166 +59,316 @@
 					<image src="../../static/img/img23.png" mode="scaleToFill"></image>
 					<view class="text">我的佣金</view>
 				</view>
-				<view class="order-item">
+				<view class="order-item" @click="nav('/pages/user/integral')">
 					<image src="../../static/img/img24.png" mode="scaleToFill"></image>
 					<view class="text">我的积分</view>
 				</view>
-				<view class="order-item">
+				<view class="order-item" @click="nav('/pages/user/extend')">
 					<image src="../../static/img/img25.png" mode="scaleToFill"></image>
 					<view class="text">我的推广</view>
 				</view>
 			</view>
 			<!-- 底部列表 -->
 			<view class="btm">
-				<view class="ul-btm">
+				<view class="ul-btm" @click="nav('/pages/user/jiedian')">
 					<image src="../../static/img/img27.png" mode="scaleToFill"></image>
 					<view class="text">我的接点</view>
-						<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
-					</view>
+					<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
+				</view>
 				<view class="ul-btm">
 					<image src="../../static/img/img28.png" mode="scaleToFill"></image>
 					<view class="text">邀请海报</view>
 					<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
-					</view>
-				<view class="ul-btm">
+				</view>
+				<view class="ul-btm" >
 					<image src="../../static/img/img29.png" mode="scaleToFill"></image>
 					<view class="text">会员注册</view>
 					<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
-					</view>
-				<view class="ul-btm">
+				</view>
+				<view class="ul-btm" @click="nav('/pages/set/address')">
 					<image src="../../static/img/img30.png" mode="scaleToFill"></image>
 					<view class="text">收货地址</view>
 					<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
-					</view>
-				<view class="ul-btm">
+				</view>
+				<view class="ul-btm" @click="open()">
 					<image src="../../static/img/img31.png" mode="scaleToFill"></image>
 					<view class="text">联系客服</view>
 					<image class="jiantou" src="../../static/img/img32.png" mode="scaleToFill"></image>
-					</view>
+				</view>
 			</view>
 		</view>
-	</view>
-</template>
-
+		<uni-popup ref="popup" type="center">
+			<view class="popup-box">
+				<view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image src="../../static/img/img010.png" mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="cancel">取消</view>
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
 <script>
-export default {
-	data () {
-		return {}
-	},
-	methods: {
-		nav (url) {
-			uni.navigateTo({
-				url
-			})
+	import { orderData, getUserInfo,service } from '@/api/user.js';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	import uniCopy from '@/utils/uni-copy.js';
+	import { mapState, mapMutations } from 'vuex';
+	export default {
+		components: {
+			uniPopup
+		},
+		data() {
+			return {
+				text:'123465'
+			}
+		},
+		onShow() {
+			//判断是否已经登录
+			if (this.hasLogin) {
+				this.loadBaseData();
+			} else {
+				uni.showModal({
+					title: '登录',
+					content: '您未登录,是否马上登陆?',
+					success: e => {
+						if (e.confirm) {
+							interceptor();
+						}
+					},
+					fail: e => {
+						console.log(e);
+					}
+				});
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			loadBaseData() {
+				getUserInfo({})
+					.then(({ data }) => {
+						console.log(data)
+						this.setUserInfo(data);
+						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+						orderData({})
+							.then(({ data }) => {
+								this.setOrderInfo(data);
+							})
+							.catch(e => {
+								this.setOrderInfo({
+									complete_count: 0, //完成
+									received_count: 0, //待收货
+									unshipped_count: 0, //待发货
+									order_count: 0, //订单总数
+									unpaid_count: 0 //待付款
+								});
+							});
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			nav(url) {
+				console.log(url)
+				uni.navigateTo({
+					url
+				})
+			},
+			open(){
+				console.log('点击出现弹窗');
+				this.$refs.popup.open();
+			},
+			// 客服弹窗 - 复制微信
+			comfirm(value) {
+				
+				let content = value; //需要复制的内容
+				console.log('复制的内容:', content);
+				// content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
+				const result = uniCopy({content,success});
+				if (result === false) {
+					uni.showToast({
+						title: '不支持'
+					});
+				} else {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none'
+					});
+				}
+				this.$refs.popup.close();
+			},
+			// 客服弹窗 - 取消
+			cancel() {
+				this.$refs.popup.close();
+			}
 		}
 	}
-}
-</script>
-
+</script>
+
 <style lang="scss">
-.container {
-	background-color: #fff;
-}
-.user {
-	image {
+	.container {
+		background-color: #fff;
+	}
+
+	.user {
+		image {
 			width: 750rpx;
 			height: 480rpx;
 			position: relative;
-	}
-	.infor {
-		height: 126.5rpx;
-		width: 100%;
-		// background-color: pink;
-		display: flex;
-		position: absolute;
-		top: 0;
-		display: flex;
-		justify-content: space-around; // 水平平均分布
-		align-items: center;   // 垂直居中 
-		margin-top: 138rpx;
-		.infor-left {
-			width: 100%;
+		}
+
+		.infor {
 			height: 126.5rpx;
+			width: 100%;
+			// background-color: pink;
 			display: flex;
-			align-items: center;
-			padding-left: 23rpx;
-			image {
-				width: 126.5rpx;
+			position: absolute;
+			top: 0;
+			display: flex;
+			justify-content: space-around; // 水平平均分布
+			align-items: center; // 垂直居中 
+			margin-top: 138rpx;
+
+			.infor-left {
+				width: 100%;
 				height: 126.5rpx;
+				display: flex;
+				align-items: center;
+				padding-left: 23rpx;
+
+				image {
+					width: 126.5rpx;
+					height: 126.5rpx;
+				}
+
+				.info-box {
+					margin-left: 21rpx;
+				}
+
+				.username {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #3F7C1F;
+				}
+
+				.phone {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #3F7C1F;
+				}
 			}
-			.info-box{
-				margin-left: 21rpx;
-			}
-			.username {
-				font-size: 34rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #3F7C1F;
-			}
-			.phone {
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #3F7C1F;
+
+			.infor-right {
+				width: 165rpx;
+				height: 64rpx;
+				background: #FFFFFF;
+				border-radius: 32px 0px 0px 32px;
+				display: flex;
+				align-items: center; // 垂直居中 
+				padding-left: 20rpx;
+
+				image {
+					width: 32rpx;
+					height: 31rpx;
+				}
+
+				.setting {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #3F7C1F;
+					padding-left: 10rpx;
+				}
 			}
 		}
-		.infor-right {
-			width: 165rpx;
-			height: 64rpx;
+
+		// 我的订单
+		.order-box {
+			width: 710rpx;
+			height: 221rpx;
 			background: #FFFFFF;
-			border-radius: 32px 0px 0px 32px;
-			display: flex;
-			align-items: center;   // 垂直居中 
-			padding-left: 20rpx;
-			image {
-				width: 32rpx;
-				height: 31rpx;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 20rpx;
+			position: absolute;
+			top: 335rpx;
+			// display: flex;
+			// justify-content: center; // 水平居中
+			margin-left: 20rpx;
+
+			.my-order {
+				height: 73rpx;
+				width: 100%;
+				border-bottom: 2rpx solid #F5F5F5;
+				display: flex;
+				align-items: center;
+				justify-content: flex-start;
+
+				.order {
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					margin-left: 36rpx;
+					margin-right: 520rpx;
+				}
+
+				image {
+					width: 12rpx;
+					height: 22rpx;
+				}
 			}
-			.setting {
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #3F7C1F;
-				padding-left: 10rpx;
+
+			.order-section {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.order-item {
+					flex: 1;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					margin-top: 30rpx;
+
+					image {
+						width: 42rpx;
+						height: 42rpx;
+					}
+
+					.text {
+						margin-top: 20rpx;
+						font-size: 24rpx;
+						color: #333333;
+					}
+				}
 			}
 		}
 	}
-	// 我的订单
-	.order-box {
-		width: 710rpx;
-		height: 221rpx;
-		background: #FFFFFF;
-		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
-		border-radius: 20rpx;
-		position: absolute;
-		top: 335rpx;
-		// display: flex;
-		// justify-content: center; // 水平居中
-		margin-left: 20rpx;
-		.my-order {
-			height: 73rpx;
-			width: 100%;
-			border-bottom: 2rpx solid #F5F5F5;
-			display: flex;
-			align-items: center;
-			justify-content: flex-start;
-			.order {
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-				margin-left: 36rpx;
-				margin-right: 520rpx;
-			}
-			image {
-				width: 12rpx;
-				height: 22rpx;
-			}
-		}
+
+	.item-box {
+		padding-top: 80rpx;
+		height: 900rpx;
+
+		// background-color: #fff;
+		// background-color: pink;
 		.order-section {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
+			justify-content: space-between; // 水平平均分布
+
 			.order-item {
 				flex: 1;
 				display: flex;
@@ -226,71 +376,135 @@ export default {
 				align-items: center;
 				justify-content: center;
 				margin-top: 30rpx;
+
 				image {
-					width: 42rpx;
-					height: 42rpx;
+					width: 90rpx;
+					height: 90rpx;
 				}
+
 				.text {
-					margin-top: 20rpx;
-					font-size: 24rpx;
-					color: #333333;
+					margin-top: 10rpx;
+					font-size: 26rpx;
+					color: #3B3B3B;
 				}
 			}
 		}
 	}
-}
-.item-box {
-	padding-top: 80rpx;
-	height: 900rpx;
-	// background-color: #fff;
-	// background-color: pink;
-	.order-section {
-		display: flex;
-		align-items: center;
-		justify-content: space-between; // 水平平均分布
-		.order-item {
-			flex: 1;
+
+	.btm {
+		margin-top: 40rpx;
+		padding-bottom: 200rpx;
+		margin-left: 42rpx;
+
+		.ul-btm {
+			width: 100%;
+			height: 100rpx;
 			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			margin-top: 30rpx;
+			// justify-content: center; // 水平居中
+			align-items: center; // 水平居中
+
+			// justify-content: center; // 垂直居中
 			image {
-				width: 90rpx;
-				height: 90rpx;
+				width: 35rpx;
+				height: 35rpx;
 			}
+
 			.text {
-				margin-top: 10rpx;
-				font-size: 26rpx;
-				color: #3B3B3B;
+				margin-right: 468rpx;
+				margin-left: 30rpx;
+			}
+
+			.jiantou {
+				width: 16rpx;
+				height: 30rpx;
 			}
 		}
 	}
-}
-.btm {
-	margin-top: 40rpx;
-	padding-bottom: 200rpx;
-	margin-left: 42rpx;
-	.ul-btm {
-		width: 100%;
-		height: 100rpx;
-		display: flex;
-		// justify-content: center; // 水平居中
-		align-items: center; // 水平居中
-		// justify-content: center; // 垂直居中
-		image {
-			width: 35rpx;
-			height: 35rpx;
-		}
-		.text {
-			margin-right: 468rpx;
-			margin-left: 30rpx;
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+		.img {
+			position: relative;
+			top: -56rpx;
+			left: 0;
+			width: 522rpx;
+			height: 132rpx;
+			display: flex;
+			justify-content: center;
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 450rpx;
+				height: 132rpx;
+			}
 		}
-		.jiantou {
-			width: 16rpx;
-			height: 30rpx;
+	
+		.mian {
+			margin-top: -44rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+	
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+				.title {
+				}
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+	
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+	
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+	
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+	
+					font-size: 32rpx;
+					color: #605128;
+				}
+	
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
 		}
 	}
-}
-
+	
 </style>

+ 118 - 27
pages/user/withdraw.vue

@@ -2,68 +2,124 @@
 	<view class="container">
 		<view class="header">
 			<view class="row-box">
-			<view class="title">可提现金额</view>
+				<view class="title">可提现金额</view>
 				<view class="row">
-					<view class="tit">¥</view>
-					<view class="counts">1000.10</view>
+					<view class="tit">¥{{money}}</view>
+					
 				</view>
 			</view>
 			<view class="row-box">
-			<view class="title">申请提现金额</view>
+				<view class="title">申请提现金额</view>
 				<view class="row">
-					<view class="tit">¥</view>
-					<view class="counts">1000</view>
+					<input class="counts" type="number" v-model="withdrawal" placeholder="请输入金额"/>
 				</view>
 			</view>
-			<view class="buttom" @click="">全部提现</view>
+			<view class="buttom" @click="withdrawal = money">全部提现</view>
 		</view>
 		<view class="conent">
 			<view class="text">提现到</view>
-			<view class="conent-box"></view>
+			<radio-group @change="tabRadio">
+				<label>
+					<view class="box">
+						<image src="../../static/img/img35.png" mode="scaleToFill"></image>
+						<view class="title-box">
+							<view class="title"><text>微信支付</text></view>
+						</view>
+						<view class="right">
+							<radio value="weixin" color="#FF4C4C" :checked="type == 'weixin'" />
+						</view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<image src="../../static/img/img36.png" mode="scaleToFill"></image>
+						<view class="title-box">
+							<view class="title"><text>银行账户</text></view>
+						</view>
+						<view class="right">
+							<radio value="bank" color="#FF4C4C" :checked="type == 'bank'" />
+						</view>
+					</view>
+				</label>
+			</radio-group>
+			<view class="btn" @click="nav('/pages/user/refer')">
+				<view class="title" >提交申请</view>
+			</view>
 		</view>
-		</view>
-</template>
-
+	</view>
+</template>
+
 <script>
-export default {
-	data () {
-		return {}
-	},
-	methods: {}
-}
-</script>
-
+	export default {
+		data() {
+			return {
+				type: 'weixin',
+				money: '0.00', //可提现金额
+				withdrawal: '' //提现金额
+			}
+		},
+		methods: {
+			tabRadio(e) {
+				console.log(e)
+				this.type = e.detail.value;
+			},
+			nav (url) {
+				uni.navigateTo({
+					url
+				})
+			}
+		}
+	}
+</script>
+
 <style lang="scss">
 	.header {
 		height: 330rpx;
 		background-color: #fff;
+
 		.row-box {
 			height: 130rpx;
 			width: 700rpx;
 			background-color: #fff;
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
 			border-bottom: 1rpx solid #E6E6E6;
 			margin: 0 auto;
+
 			.title {
 				font-size: 32rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
 				color: #333333;
+				width: 100%;
 			}
+
 			.row {
 				display: flex;
-				justify-content: center;
+				justify-content: space-between;
 				align-items: center;
+
+				.tit {
+					width: 300rpx;
+
+				}
+
 				.counts {
+					// text-align: right;
+					// width: 100rpx;
 					font-size: 50rpx;
 					font-family: Source Han Sans CN;
 					font-weight: 500;
 					color: #333333;
+
+					// &::before {
+					// 	content: '¥';
+						
+					// }
 				}
 			}
 		}
+
 		.buttom {
 			margin-top: 10rpx;
 			margin-left: 620rpx;
@@ -77,24 +133,59 @@ export default {
 			line-height: 42rpx;
 		}
 	}
+
 	.conent {
 		margin-top: 20rpx;
 		height: 890rpx;
 		background-color: #fff;
+
 		.text {
 			font-size: 30rpx;
 			font-family: Source Han Sans CN;
 			font-weight: 400;
 			color: #333333;
-			padding-top: 20rpx;
 			margin-left: 20rpx;
+			padding-top: 20rpx;
 		}
-		.conent-box {
-			height: 130rpx;
-			width: 700rpx;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 710rpx;
+			height: 100rpx;
 			border-bottom: 1rpx solid #E6E6E6;
-			margin: 0 auto;
+			margin-left: 20rpx;
+
+			image {
+				width: 40rpx;
+				height: 40rpx;
+				margin-left: 20rpx;
+				margin-right: 20rpx;
+			}
+
+			.title-box {
+				margin-right: 440rpx;
+			}
+		}
+
+		.btn {
+			margin-top: 120rpx;
+			width: 670rpx;
+			height: 100rpx;
+			background: #6EAB4E;
+			border-radius: 10rpx;
+			display: flex;
+			justify-content: center;
+			margin-left: 40rpx;
+
+			.title {
+				display: flex;
+				align-items: center;
+				font-size: 32rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
 		}
 	}
-	
 </style>

BIN
plugin/.git.rar


+ 554 - 551
static/css/cmy.css

@@ -1,551 +1,554 @@
-/*初始化类*/
-@font-face {
-	font-family: 'iconfont';
-	/* project id 1482221 */
-	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
-	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
-}
-
-.acea-row {
-	display: -webkit-box;
-	display: -moz-box;
-	display: -webkit-flex;
-	display: -ms-flexbox;
-	display: flex;
-	-webkit-box-lines: multiple;
-	-moz-box-lines: multiple;
-	-o-box-lines: multiple;
-	-webkit-flex-wrap: wrap;
-	-ms-flex-wrap: wrap;
-	flex-wrap: wrap
-}
-
-.acea-row.row-middle {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center
-}
-
-.bg-color-red {
-	background-color: #e93323 !important;
-}
-
-.acea-row.row-right {
-	-webkit-box-pack: end;
-	-moz-box-pack: end;
-	-o-box-pack: end;
-	-ms-flex-pack: end;
-	-webkit-justify-content: flex-end;
-	justify-content: flex-end
-}
-
-.acea-row.row-between-wrapper {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center;
-	-webkit-box-pack: justify;
-	-moz-box-pack: justify;
-	-o-box-pack: justify;
-	-ms-flex-pack: justify;
-	-webkit-justify-content: space-between;
-	justify-content: space-between
-}
-
-.acea-row.row-column-around {
-	-webkit-flex-direction: column;
-	-ms-flex-direction: column;
-	flex-direction: column;
-	justify-content: space-around;
-	-webkit-justify-content: space-around
-}
-
-.acea-row.row-center-wrapper {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center;
-	-webkit-box-pack: center;
-	-moz-box-pack: center;
-	-o-box-pack: center;
-	-ms-flex-pack: center;
-	-webkit-justify-content: center;
-	justify-content: center
-}
-
-.iconfont {
-	font-family: "iconfont" !important;
-	font-size: 34rpx;
-	font-style: normal;
-	-webkit-font-smoothing: antialiased;
-	-webkit-text-stroke-width: 0rpx;
-	-moz-osx-font-smoothing: grayscale;
-}
-
-.iconedit:before {
-	content: "\e649";
-}
-
-.iconfavorfill:before {
-	content: "\e64b";
-}
-
-.iconfavor:before {
-	content: "\e64c";
-}
-
-.iconlocation:before {
-	content: "\e651";
-}
-
-.iconroundcheckfill:before {
-	content: "\e656";
-}
-
-.iconroundcheck:before {
-	content: "\e657";
-}
-
-.iconunfold:before {
-	content: "\e661";
-}
-
-.iconlikefill:before {
-	content: "\e668";
-}
-
-.iconlike:before {
-	content: "\e669";
-}
-
-.iconshop:before {
-	content: "\e676";
-}
-
-.iconcart:before {
-	content: "\e6af";
-}
-
-.icondelete:before {
-	content: "\e6b4";
-}
-
-.iconhome:before {
-	content: "\e6b8";
-}
-
-.iconcartfill:before {
-	content: "\e6b9";
-}
-
-.iconhomefill:before {
-	content: "\e6bb";
-}
-
-.iconlock:before {
-	content: "\e6c0";
-}
-
-.iconfriendadd:before {
-	content: "\e6ca";
-}
-
-.iconfold:before {
-	content: "\e6de";
-}
-
-.iconapps:before {
-	content: "\e729";
-}
-
-.iconadd:before {
-	content: "\e767";
-}
-
-.iconmove:before {
-	content: "\e768";
-}
-
-.icontriangledownfill:before {
-	content: "\e79b";
-}
-
-.icontriangleupfill:before {
-	content: "\e79c";
-}
-
-.iconshaixuan:before {
-	content: "\e74a";
-}
-
-.iconyanzhengma:before {
-	content: "\e684";
-}
-
-.iconjifen:before {
-	content: "\e60f";
-}
-
-.iconwuliuxinxi:before {
-	content: "\e62b";
-}
-
-.iconmessage:before {
-	content: "\e78a";
-}
-
-.iconsetting:before {
-	content: "\e78e";
-}
-
-.iconaddition:before {
-	content: "\e6e0";
-}
-
-.iconclose:before {
-	content: "\e6e9";
-}
-
-.iconenter:after {
-	content: "\e6f8";
-}
-
-.iconprompt:before {
-	content: "\e71b";
-}
-
-.iconreturn:before {
-	content: "\e720";
-}
-
-.iconsearch:before {
-	content: "\e741";
-}
-
-.iconpengyouquan:before {
-	content: "\e62c";
-}
-
-.iconweixin:before {
-	content: "\e60e";
-}
-
-.iconzhifubao:before {
-	content: "\e673";
-}
-
-.iconyue:before {
-	content: "\e618";
-}
-
-.iconweixin1:before {
-	content: "\e622";
-}
-
-.iconlock1:before {
-	content: "\e64d";
-}
-
-.iconuser:before {
-	content: "\e64e";
-}
-
-.iconchenggongtixianshouyi:before {
-	content: "\e64f";
-}
-
-.iconviptuiguangdingdan:before {
-	content: "\e650";
-}
-
-.icondaifukuan:before {
-	content: "\e652";
-}
-
-.icondaijiesuanshouyi:before {
-	content: "\e653";
-}
-
-.icondaidakuanshouyi:before {
-	content: "\e654";
-}
-
-.icondaifahuo:before {
-	content: "\e655";
-}
-
-.icondaishouhuoshouyi:before {
-	content: "\e658";
-}
-
-.icondaishouhuo:before {
-	content: "\e659";
-}
-
-.iconwuxiaoshouyi:before {
-	content: "\e65a";
-}
-
-.icontixianmingxi:before {
-	content: "\e65b";
-}
-
-.iconshouyi:before {
-	content: "\e65c";
-}
-
-.iconkouchutixianshouxufei:before {
-	content: "\e65d";
-}
-
-.iconyishenqingshouyi:before {
-	content: "\e65e";
-}
-
-.icontuihuanhuo:before {
-	content: "\e65f";
-}
-
-
-/*水平线*/
-.hr {
-	width: 100%;
-	position: relative;
-	border-bottom: 1px solid #dddddd;
-	/* height: 0.5rpx; */
-}
-
-/* 一行显示 */
-.clamp {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-	display: block;
-}
-
-/* 二行显示 */
-.clamp2 {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-line-clamp: 2;
-	-webkit-box-orient: vertical;
-}
-
-/* 二行显示 */
-.ellipsis {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-box-orient: vertical;
-	-webkit-line-clamp: 2;
-}
-
-.common-hover {
-	background: #f5f5f5;
-}
-
-/* 角标 */
-.corner {
-	background-color: #e51c23;
-	position: absolute;
-	right: -18rpx;
-	top: -18rpx;
-	color: #FFFFFF;
-	text-align: center;
-	border-radius: 999px;
-	font-size: 24rpx !important;
-	min-width: 35rpx;
-	min-height: 35rpx;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	line-height: 1;
-}
-
-.flex_item {
-	display: flex;
-	align-items: center;
-	/* justify-content: space-between; */
-}
-
-/* 左右顶格加上下居中 */
-.flex-between-center {
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-}
-
-/* flex布局-整体居中 */
-.flex-center {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
-
-.flex-start {
-	display: flex;
-	align-items: center;
-	justify-content: flex-start;
-}
-
-/*文字对齐*/
-.text-left {
-	text-align: left !important;
-}
-
-.text-center {
-	text-align: center !important;
-}
-
-.text-justify {
-	text-align: justify !important;
-}
-
-.text-right {
-	text-align: right !important;
-}
-
-.text-default {
-	color: #212121 !important;
-}
-
-.text-white {
-	color: #ffffff !important;
-}
-
-.text-primary {
-	color: #00bcd4 !important;
-}
-
-.text-success {
-	color: #009688 !important;
-}
-
-.text-info {
-	color: #03a9f4 !important;
-}
-
-.text-warning {
-	color: #ffc107 !important;
-}
-
-.text-danger {
-	color: #e51c23 !important;
-}
-
-.text-pink {
-	color: #e91e63 !important;
-}
-
-.text-purple {
-	color: #673ab7 !important;
-}
-
-.text-indigo {
-	color: #3f51b5 !important;
-}
-
-.text-gray {
-	color: #999999 !important;
-}
-
-.bg-default {
-	background-color: #f5f5f5 !important;
-}
-
-.bg-primary {
-	background-color: #00bcd4 !important;
-}
-
-.bg-success {
-	background-color: #009688 !important;
-}
-
-.bg-info {
-	background-color: #03a9f4 !important;
-}
-
-.bg-warning {
-	background-color: #FFB238 !important;
-}
-
-.bg-danger {
-	background-color: #DC4D46 !important;
-}
-
-.bg-pink {
-	background-color: #e91e63 !important;
-}
-
-.bg-purple {
-	background-color: #673ab7 !important;
-}
-
-.bg-indigo {
-	background-color: #3f51b5 !important;
-}
-
-.bg-white {
-	background-color: white !important;
-}
-
-.bg-gray {
-	background-color: #e3e3e3 !important;
-}
-
-/* 边框 */
-.border-radius-15 {
-	border-radius: 15rpx;
-}
-
-.border-radius-10 {
-	border-radius: 10rpx;
-}
-
-.border-radius-all {
-	border-radius: 1000rpx;
-}
-
-/* 底部边线 */
-.borde-b {
-	border-bottom: 1px solid #dddddd;
-}
-
-/* 弹性盒子 */
-.flex {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-}
-
-.items-left {
-	justify-content: flex-start;
-}
-
-.items-right {
-	justify-content: flex-end;
-}
-
-.flex-shrink-false {
-	flex-shrink: 0;
-}
-
-.flex-grow-true {
-	flex-grow: 1;
-}
-
-.position-relative {
-	position: relative;
-}
+/*初始化类*/
+@font-face {
+	font-family: 'iconfont';
+	/* project id 1482221 */
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
+}
+
+.acea-row {
+	display: -webkit-box;
+	display: -moz-box;
+	display: -webkit-flex;
+	display: -ms-flexbox;
+	display: flex;
+	-webkit-box-lines: multiple;
+	-moz-box-lines: multiple;
+	-o-box-lines: multiple;
+	-webkit-flex-wrap: wrap;
+	-ms-flex-wrap: wrap;
+	flex-wrap: wrap
+}
+
+.acea-row.row-middle {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center
+}
+
+.bg-color-red {
+	background-color: #e93323 !important;
+}
+
+.acea-row.row-right {
+	-webkit-box-pack: end;
+	-moz-box-pack: end;
+	-o-box-pack: end;
+	-ms-flex-pack: end;
+	-webkit-justify-content: flex-end;
+	justify-content: flex-end
+}
+
+.acea-row.row-between-wrapper {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+	-webkit-box-pack: justify;
+	-moz-box-pack: justify;
+	-o-box-pack: justify;
+	-ms-flex-pack: justify;
+	-webkit-justify-content: space-between;
+	justify-content: space-between
+}
+
+.acea-row.row-column-around {
+	-webkit-flex-direction: column;
+	-ms-flex-direction: column;
+	flex-direction: column;
+	justify-content: space-around;
+	-webkit-justify-content: space-around
+}
+
+.acea-row.row-center-wrapper {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+	-webkit-box-pack: center;
+	-moz-box-pack: center;
+	-o-box-pack: center;
+	-ms-flex-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center
+}
+
+.iconfont {
+	font-family: "iconfont" !important;
+	font-size: 34rpx;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-webkit-text-stroke-width: 0rpx;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+.iconedit:before {
+	content: "\e649";
+}
+
+.iconfavorfill:before {
+	content: "\e64b";
+}
+
+.iconfavor:before {
+	content: "\e64c";
+}
+
+.iconlocation:before {
+	content: "\e651";
+}
+
+.iconroundcheckfill:before {
+	content: "\e656";
+}
+
+.iconroundcheck:before {
+	content: "\e657";
+}
+
+.iconunfold:before {
+	content: "\e661";
+}
+
+.iconlikefill:before {
+	content: "\e668";
+}
+
+.iconlike:before {
+	content: "\e669";
+}
+
+.iconshop:before {
+	content: "\e676";
+}
+
+.iconcart:before {
+	content: "\e6af";
+}
+
+.icondelete:before {
+	content: "\e6b4";
+}
+
+.iconhome:before {
+	content: "\e6b8";
+}
+
+.iconcartfill:before {
+	content: "\e6b9";
+}
+
+.iconhomefill:before {
+	content: "\e6bb";
+}
+
+.iconlock:before {
+	content: "\e6c0";
+}
+
+.iconfriendadd:before {
+	content: "\e6ca";
+}
+
+.iconfold:before {
+	content: "\e6de";
+}
+
+.iconapps:before {
+	content: "\e729";
+}
+
+.iconadd:before {
+	content: "\e767";
+}
+
+.iconmove:before {
+	content: "\e768";
+}
+
+.icontriangledownfill:before {
+	content: "\e79b";
+}
+
+.icontriangleupfill:before {
+	content: "\e79c";
+}
+
+.iconshaixuan:before {
+	content: "\e74a";
+}
+
+.iconyanzhengma:before {
+	content: "\e684";
+}
+
+.iconjifen:before {
+	content: "\e60f";
+}
+
+.iconwuliuxinxi:before {
+	content: "\e62b";
+}
+
+.iconmessage:before {
+	content: "\e78a";
+}
+
+.iconsetting:before {
+	content: "\e78e";
+}
+
+.iconaddition:before {
+	content: "\e6e0";
+}
+
+.iconclose:before {
+	content: "\e6e9";
+}
+
+.iconenter:after {
+	content: "\e6f8";
+}
+
+.iconprompt:before {
+	content: "\e71b";
+}
+
+.iconreturn:before {
+	content: "\e720";
+}
+
+.iconsearch:before {
+	content: "\e741";
+}
+
+.iconpengyouquan:before {
+	content: "\e62c";
+}
+
+.iconweixin:before {
+	content: "\e60e";
+}
+
+.iconzhifubao:before {
+	content: "\e673";
+}
+
+.iconyue:before {
+	content: "\e618";
+}
+
+.iconweixin1:before {
+	content: "\e622";
+}
+
+.iconlock1:before {
+	content: "\e64d";
+}
+
+.iconuser:before {
+	content: "\e64e";
+}
+
+.iconchenggongtixianshouyi:before {
+	content: "\e64f";
+}
+
+.iconviptuiguangdingdan:before {
+	content: "\e650";
+}
+
+.icondaifukuan:before {
+	content: "\e652";
+}
+
+.icondaijiesuanshouyi:before {
+	content: "\e653";
+}
+
+.icondaidakuanshouyi:before {
+	content: "\e654";
+}
+
+.icondaifahuo:before {
+	content: "\e655";
+}
+
+.icondaishouhuoshouyi:before {
+	content: "\e658";
+}
+
+.icondaishouhuo:before {
+	content: "\e659";
+}
+
+.iconwuxiaoshouyi:before {
+	content: "\e65a";
+}
+
+.icontixianmingxi:before {
+	content: "\e65b";
+}
+
+.iconshouyi:before {
+	content: "\e65c";
+}
+
+.iconkouchutixianshouxufei:before {
+	content: "\e65d";
+}
+
+.iconyishenqingshouyi:before {
+	content: "\e65e";
+}
+
+.icontuihuanhuo:before {
+	content: "\e65f";
+}
+
+
+/*水平线*/
+.hr {
+	width: 100%;
+	position: relative;
+	border-bottom: 1px solid #dddddd;
+	/* height: 0.5rpx; */
+}
+
+/* 一行显示 */
+.clamp {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	display: block;
+}
+
+/* 二行显示 */
+.clamp2 {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+
+/* 二行显示 */
+.ellipsis {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+}
+
+.common-hover {
+	background: #f5f5f5;
+}
+
+/* 角标 */
+.corner {
+	background-color: #e51c23;
+	position: absolute;
+	right: -18rpx;
+	top: -18rpx;
+	color: #FFFFFF;
+	text-align: center;
+	border-radius: 999px;
+	font-size: 24rpx !important;
+	min-width: 35rpx;
+	min-height: 35rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	line-height: 1;
+}
+
+.flex_item {
+	display: flex;
+	align-items: center;
+	/* justify-content: space-between; */
+}
+
+/* 左右顶格加上下居中 */
+.flex-between-center {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+
+/* flex布局-整体居中 */
+.flex-center {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.flex-start {
+	display: flex;
+	align-items: center;
+	justify-content: flex-start;
+}
+
+/*文字对齐*/
+.text-left {
+	text-align: left !important;
+}
+
+.text-center {
+	text-align: center !important;
+}
+
+.text-justify {
+	text-align: justify !important;
+}
+
+.text-right {
+	text-align: right !important;
+}
+
+.text-default {
+	color: #212121 !important;
+}
+
+.text-white {
+	color: #ffffff !important;
+}
+
+.text-primary {
+	color: #00bcd4 !important;
+}
+
+.text-success {
+	color: #009688 !important;
+}
+
+.text-info {
+	color: #03a9f4 !important;
+}
+
+.text-warning {
+	color: #ffc107 !important;
+}
+
+.text-danger {
+	color: #e51c23 !important;
+}
+
+.text-pink {
+	color: #e91e63 !important;
+}
+
+.text-purple {
+	color: #673ab7 !important;
+}
+
+.text-indigo {
+	color: #3f51b5 !important;
+}
+
+.text-gray {
+	color: #999999 !important;
+}
+
+.bg-default {
+	background-color: #f5f5f5 !important;
+}
+
+.bg-primary {
+	background-color: #00bcd4 !important;
+}
+
+.bg-success {
+	background-color: #009688 !important;
+}
+
+.bg-info {
+	background-color: #03a9f4 !important;
+}
+
+.bg-warning {
+	background-color: #FFB238 !important;
+}
+
+.bg-danger {
+	background-color: #DC4D46 !important;
+}
+
+.bg-pink {
+	background-color: #e91e63 !important;
+}
+
+.bg-purple {
+	background-color: #673ab7 !important;
+}
+
+.bg-indigo {
+	background-color: #3f51b5 !important;
+}
+
+.bg-white {
+	background-color: white !important;
+}
+
+.bg-gray {
+	background-color: #e3e3e3 !important;
+}
+
+/* 边框 */
+.border-radius-15 {
+	border-radius: 15rpx;
+}
+
+.border-radius-10 {
+	border-radius: 10rpx;
+}
+
+.border-radius-all {
+	border-radius: 1000rpx;
+}
+
+/* 底部边线 */
+.borde-b {
+	border-bottom: 1px solid #dddddd;
+}
+
+/* 弹性盒子 */
+.flex {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.items-left {
+	justify-content: flex-start;
+}
+
+.items-right {
+	justify-content: flex-end;
+}
+
+.flex-shrink-false {
+	flex-shrink: 0;
+}
+
+.flex-grow-true {
+	flex-grow: 1;
+}
+
+.position-relative {
+	position: relative;
+}
+.rich-img {
+		width: 100% !important;
+	}

BIN
static/icon/del.png


BIN
static/icon/jf.png


BIN
static/icon/share.png


BIN
static/image/background01.png


BIN
static/image/background02.png


BIN
static/image/background03.png


BIN
static/image/baodan.png


BIN
static/image/carousel.png


BIN
static/image/jiedian.png


BIN
static/image/jiedian1.png


BIN
static/image/jifen.png


BIN
static/image/jifen1.png


BIN
static/image/photo.jpg


BIN
static/image/sanchaji.png


BIN
static/image/search.png


BIN
static/img/img009.png


BIN
static/img/img010.png


BIN
static/img/img38.png


BIN
static/img/img39.png


BIN
static/img/jiedian.png


BIN
static/img/shareimg.png


+ 1 - 1
uni.scss

@@ -4,7 +4,7 @@ $page-row-spacing: 30rpx;
 $page-color-base: #f8f8f8;//页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #5dbc7c;//项目颜色
+$base-color: #6EAB4E;//项目颜色
 $box-shadow-color:#5dbc7c;//阴影颜色
 $font-color:#5dbc7c;//字体颜色
 $font-color-spec: #5dbc7c;//可操作文字颜色

+ 1 - 0
utils/uni-copy.js

@@ -1,4 +1,5 @@
 export default function uniCopy({content,success,error}) {
+	console.log(content,"123456")
 	if(!content) return error('复制的内容不能为空 !')
 	content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串
 	/**

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません