Kaynağa Gözat

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile

linwenxin 1 yıl önce
ebeveyn
işleme
cdc0beaec8

+ 3 - 3
.env.development

@@ -2,10 +2,10 @@
 NODE_ENV = 'development'
 
 # URL地址
-VUE_APP_BASE_URL = 'https://knowledge.zfire.top'
+VUE_APP_BASE_URL = 'https://jiasm.zfire.top'
 
 # API
-VUE_APP_BASE_API = '/api'
+VUE_APP_BASE_API = '/recycleapi'
 
 # PATH
-VUE_APP_BASE_PATH = '/'
+VUE_APP_BASE_PATH = '/'

+ 3 - 3
src/common/http/index.js

@@ -48,9 +48,9 @@ export const $http = (url, method, data, json) => {
         //   })
         // })
 
-        uni.navigateTo({
-          url: '/pages/login/indexs'
-        })
+        // uni.navigateTo({
+        //   url: '/pages/login/indexs'
+        // })
       }
       return Promise.reject(new Error(res.message || 'Error'))
     } else {

+ 38 - 1
src/common/utils/util.js

@@ -95,7 +95,44 @@ export const uploadImg = async function(file) {
   })
 }
 
+export const getArea = function(str) {
+	let area = {}
+	let index11 = 0
+	let index1 = str.indexOf("省")
+	if (index1 == -1) {
+	  index11 = str.indexOf("自治区")
+	  if (index11 != -1) {
+	    area.Province = str.substring(0, index11 + 3)
+	  } else {
+	    area.Province = str.substring(0, 0)
+	  }
+	} else {
+	  area.Province = str.substring(0, index1 + 1)
+	}
+				 
+	let index2 = str.indexOf("市")
+	if (index11 == -1) {
+	  area.City = str.substring(index11 + 1, index2 + 1)
+	} else {
+	  if (index11 == 0) {
+	    area.City = str.substring(index1 + 1, index2 + 1)
+	  } else {
+	    area.City = str.substring(index11 + 3, index2 + 1)
+	  }
+	}
+				 
+	let index3 = str.lastIndexOf("区")
+	if (index3 == -1) {
+	  index3 = str.indexOf("县")
+	  area.Country = str.substring(index2 + 1, index3 + 1)
+	} else {
+	  area.Country = str.substring(index2 + 1, index3 + 1)
+	}
+	return area;
+}
+
 export default {
   getUserInfo,
-  uploadImg
+  uploadImg,
+  getArea
 };

+ 86 - 0
src/components/Loading.vue

@@ -0,0 +1,86 @@
+<template>
+	<view>
+		<view v-if="type === 1">
+			<u-empty
+				mode="list"
+				icon="/static/images/common/empty_data.png"
+				:text="loadStatus === 1 ? loadText : showText"
+				v-if="dataList.length < 1">
+			</u-empty>
+			<view class="loadmore" v-else>
+				<u-loadmore :status="loadStatus | statusFilter" />
+			</view>
+		</view>
+		
+		<view v-if="type === 2">
+			<u-empty
+				mode="list"
+				icon="/static/images/common/empty_data.png"
+				:text="loadStatus === 1 ? loadText : showText"
+				v-if="dataList.length < 1">
+			</u-empty>
+		</view>
+		
+		<view v-if="type === 3">
+			<u-loading-page :loading-text="loadText" :loading="loadStatus === 1"></u-loading-page>
+			<u-empty
+				mode="list"
+				icon="/static/images/common/empty_data.png"
+				:text="showText"
+				v-if="loadStatus === 2">
+			</u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		filters: {
+			statusFilter(val) {
+				const MAP = {
+					0: 'loadmore',
+					1: 'loading',
+					2: 'nomore',
+				}
+				return MAP[val];
+			}
+		},
+		
+		props: {
+			type: {
+				type: Number,
+				default: 1, // 1=分页列表,2=普通列表,3=其他/详情
+			},
+			loadStatus: {
+				type: Number,
+				default: 0 // 0=未加载=loadmore,1=加载中=loading,2=没有更多数据=nomore
+			},
+			dataList: {
+				type: Array,
+				default: []
+			},
+			showText: {
+				type: String,
+				default: '暂无数据'
+			},
+			loadText: {
+				type: String,
+				default: '加载中...'
+			}
+		},
+		data() {
+			return{
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.loadmore {
+		padding: 20rpx 0;
+		.u-loadmore {
+			margin: 0;
+		}
+	}
+</style>

+ 100 - 0
src/components/custom.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="navigation" >
+		<view class="me-container" :class="bgColor">
+			<view class="me-left flex_ac">
+				<!-- <view v-if="isBack" @tap="toBack" class="iconfont icon-back"></view> -->
+				<!-- <image v-if="isBack" @tap="toBack" src="@/static/icon/back.png"></image> -->
+        <u-icon name="arrow-left" v-if="isBack" @tap="toBack"></u-icon>
+				<slot name="left"></slot>
+			</view>
+			<view class="me-content">
+				<slot name="content"></slot>
+			</view>
+			<view class="me-right">
+				<slot name="right"></slot>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			isBack:{
+				type:Boolean,
+				default:true
+			},
+			bgColor:{
+				type:String,
+				default:'bg-white'
+			}
+		},
+		computed:{
+
+		},
+		data() {
+			return {
+				StatusBar:this.StatusBar,
+				CustomBar:this.CustomBar
+			};
+		},
+		methods:{
+			toBack(){
+				uni.navigateBack({
+					delta:1
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	cover-view{
+		box-sizing: border-box;
+	}
+.navigation{
+  height: 88rpx;
+	position: relative;
+	.bg-none {
+		background: none;
+	}
+	.bg-white{
+		background: #FFFFFF;
+	}
+	.bg-tran{
+		background: transparent;
+	}
+	.bg-them{
+		background: #fb5152;
+	}
+	.bg-linear {
+		background: linear-gradient(-45deg, #6da7ff 0%, #7fdaff 100%);
+	}
+	.me-container{
+		position: fixed;
+		width: 100%;
+		top: 0;
+		z-index: 1024;
+		// box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.1);
+		// padding: 0 30rpx;
+    height: 88rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		.me-content{
+			position: absolute;
+			left: 50%;
+			transform: translateX(-50%);
+		}
+		.me-left{
+			image {
+				width: 32rpx;
+				height: 32rpx;
+				display: block;
+				margin-left: 30rpx;
+			}
+		}
+
+	}
+}
+</style>

+ 1 - 1
src/components/zj-container/zj-page-layout.vue

@@ -2,7 +2,7 @@
 	<view
 		class="app-container"
 		:class="hasFooter || isTabbar ? '':'pb'"
-		:style="{background: bgColor, height: 'calc(100vh - ' + (isTabbar ? '94' : '44') + 'px)'}">
+		:style="{background: bgColor, height: 'calc(100vh - ' + (isTabbar ? '50' : '44') + 'px)'}">
 		<u-loading-page
 			loading-text="家盛茂工程师"
 			color="#333333"

+ 3 - 1
src/main.js

@@ -53,8 +53,10 @@ App.mpType = 'app'
 import api from '@/common/http/'
 Vue.prototype.$api = api
 
-import custom from '@/components/zj/custom.vue';
+import custom from '@/components/custom.vue';
+import Loading from '@/components/Loading.vue';
 Vue.component('custom', custom);
+Vue.component('Loading', Loading);
 
 import {
   getUserInfo

+ 5 - 5
src/manifest.json

@@ -13,7 +13,7 @@
     },
     "h5" : {
         "title" : "",
-        "publicPath" : "/",
+        "publicPath": "/",
         "devServer" : {
             "https" : false,
             "port" : 3000,
@@ -31,7 +31,7 @@
         },
         "router" : {
             "mode" : "history",
-            "base" : "/"
+            "base": "/"
         },
         "optimization" : {
             "prefetch" : true,
@@ -75,9 +75,9 @@
     },
     "app-plus" : {
         /* 5+App特有相关 */
-        "usingComponents" : false,
+        "usingComponents": false,
         "splashscreen" : {
-            "alwaysShowBeforeRender" : false,
+            "alwaysShowBeforeRender": false,
             "waiting" : true,
             "autoclose" : true,
             "delay" : 0
@@ -125,7 +125,7 @@
         "usingComponents" : true
     },
     "mp-baidu" : {
-        "usingComponents" : false
+        "usingComponents": false
     },
     "mp-toutiao" : {
         "usingComponents" : true

+ 38 - 1
src/pages.json

@@ -18,6 +18,7 @@
     {
       "path": "pages/index/index",
       "style": {
+        "navigationStyle": "custom",
         "navigationBarTitleText": "首页"
       }
     },
@@ -64,6 +65,42 @@
       "style": {
         "navigationBarTitleText": "我的收益"
       }
+    },
+    {
+      "path": "pages/mine/address/list",
+      "style": {
+        "navigationBarTitleText": "我的地址"
+      }
+    },
+    {
+      "path": "pages/mine/address/form",
+      "style": {
+        "navigationBarTitleText": "添加地址"
+      }
+    },
+    {
+      "path": "pages/mine/parse",
+      "style": {
+        "navigationBarTitleText": "防骗指南"
+      }
+    },
+    {
+      "path": "pages/goods/list",
+      "style": {
+        "navigationBarTitleText": "商品列表"
+      }
+    },
+    {
+      "path": "pages/goods/detail",
+      "style": {
+        "navigationBarTitleText": "商品详情"
+      }
+    },
+    {
+      "path": "pages/goods/order",
+      "style": {
+        "navigationBarTitleText": "确认订单"
+      }
     }
 
   ],
@@ -84,7 +121,7 @@
     "navigationBarTextStyle": "black",
     "navigationBarTitleText": "uni-app",
     "navigationBarBackgroundColor": "#fff",
-    "backgroundColor": "#F8F8F8",
+    "backgroundColor": "#f4f2f2",
     "onReachBottomDistance": 100
   },
   "tabBar": {

+ 182 - 0
src/pages/goods/detail.vue

@@ -0,0 +1,182 @@
+<template>
+  <zj-page-layout
+  	:hasFooter="false"
+  	:isScroll="true"
+  	:refresherTriggered="refresherTriggered"
+  	@refresherrefresh="refresherrefresh">
+    <view class="top-container">
+      <view class="user">
+        <image src="@/static/common/logo.png"></image>
+        <view class="info">
+          <view class="name">张三</view>
+          <view class="phone">联系电话:138****2233</view>
+        </view>
+      </view>
+      <view class="btns">
+        <u-button type="warning" text="分享好友" class="share"></u-button>
+        <u-button type="error" text="立即联系" class="contact"></u-button>
+        <u-button type="primary" text="立即购买" class="buy" @tap="$navPage(`/pages/goods/order`)"></u-button>
+      </view>
+    </view>
+
+    <view class="info-container">
+      <view class="title">
+        <view class="tit">商品名称</view>
+        <view class="price">¥1234.00</view>
+      </view>
+      <view class="des">商品描述商品描述商品描述商品描述商品描述</view>
+      <view class="tags">
+        <view class="it">格力</view>
+        <view class="it">7200w</view>
+        <view class="it">一级能效</view>
+      </view>
+      <view class="info">
+        <view class="left">
+          <text>23小时前发布</text>
+          <text>20人浏览</text>
+        </view>
+        <view class="right">库存10</view>
+      </view>
+      <view class="bottom">
+        <view class="left-location">天河区棠下</view>
+        <view class="right-stats">
+          <view class="it">
+            <text class="iconfont icon-dianzan"></text>
+            <text class="text">点赞</text>
+          </view>
+          <view class="it">
+            <text class="iconfont icon-pinglun"></text>
+            <text class="text">收藏</text>
+          </view>
+        </view>
+      </view>
+    </view>
+
+  </zj-page-layout>
+</template>
+
+<script>
+
+</script>
+
+<style lang="scss" scoped>
+.top-container {
+  background: #ffffff;
+  margin-top: 30rpx;
+  padding: 30rpx;
+  .user {
+    display: flex;
+    align-items: center;
+    image {
+      width: 88rpx;
+      height: 88rpx;
+      border-radius: 50%;
+    }
+    .info {
+      margin-left: 12rpx;
+      .name {
+        font-size: 28rpx;
+      }
+      .phone {
+        font-size: 28rpx;
+        margin-top: 12rpx;
+      }
+    }
+  }
+  .btns {
+    display: flex;
+    justify-content: space-between;
+    margin-top: 30rpx;
+    ::v-deep .u-button {
+      width: 188rpx;
+      height: 68rpx;
+      line-height: 68rpx;
+      font-size: 28rpx;
+      color: #ffffff;
+      margin: 0;
+    }
+    .share {
+
+    }
+  }
+}
+
+.info-container {
+  background: #ffffff;
+  padding: 30rpx;
+  margin-top: 30rpx;
+  .title {
+    display: flex;
+    justify-content: space-between;
+    .tit {
+      font-size: 32rpx;
+    }
+    .price {
+      font-size: 28rpx;
+      color: $assist-color;
+    }
+  }
+  .des {
+    margin-top: 12rpx;
+    font-size: 28rpx;
+    color: $reg-font;
+  }
+  .tags {
+    margin-top: 12rpx;
+    display: flex;
+    .it {
+      background: #f1f1f1;
+      font-size: 20rpx;
+      margin-right: 20rpx;
+      padding: 8rpx 12rpx;
+      border-radius: 8rpx;
+    }
+  }
+  .info {
+    display: flex;
+    justify-content: space-between;
+    margin-top: 20rpx;
+    .left {
+      text {
+        font-size: 24rpx;
+        color: $sec-font;
+        margin-right: 20rpx;
+      }
+    }
+    .right {
+      font-size: 24rpx;
+      color: $sec-font;
+    }
+  }
+  .bottom {
+    border-top: 1px solid #eaeaea;
+    margin-top: 20rpx;
+    padding-top: 20rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .left-location {
+      font-size: 24rpx;
+      color: $sec-font;
+    }
+    .right-stats {
+      display: flex;
+      align-items: center;
+      .it {
+        display: flex;
+        align-items: center;
+        margin-left: 16rpx;
+        .iconfont {
+          font-size: 28rpx;
+          color: $sec-font;
+        }
+        .text {
+          font-size: 24rpx;
+          margin-left: 4rpx;
+          color: $sec-font;
+        }
+      }
+    }
+  }
+}
+</style>

+ 152 - 0
src/pages/goods/list.vue

@@ -0,0 +1,152 @@
+<template>
+  <zj-page-layout
+  	:hasFooter="false"
+  	:isScroll="true"
+  	:refresherTriggered="refresherTriggered"
+  	@refresherrefresh="refresherrefresh"
+  	@scrolltolower="scrolltolower">
+    <template slot="header">
+      <view class="header-container">
+        <u-tabs
+          :list="categoryList"
+          @click="click"
+          :scrollable="false"
+          lineColor="#01C30B">
+        </u-tabs>
+        <u-search
+          placeholder="输入商品名称搜索"
+          :showAction="false"
+          clearabled
+          v-model="keyword">
+        </u-search>
+        <u-tabs
+          :list="tabList"
+          @click="click"
+          :scrollable="false"
+          lineColor="#01C30B">
+        </u-tabs>
+      </view>
+    </template>
+
+    <view class="common-goods-list">
+      <view class="item" @tap="$navPage(`/pages/goods/detail`)">
+        <view class="top">
+          <image src="@/static/common/logo.png"></image>
+          <view class="user">
+            <view class="name">张三</view>
+            <view class="time">23小时前发布</view>
+          </view>
+          <view class="price">¥1888.00</view>
+        </view>
+        <view class="title">商品名称</view>
+        <view class="des">商品描述</view>
+        <view class="imgs">
+          <image src="@/static/user/other_speech.png"></image>
+          <image src="@/static/user/other_speech.png"></image>
+          <image src="@/static/user/other_speech.png"></image>
+        </view>
+        <view class="bottom">
+          <view class="left-location">天河区棠下</view>
+          <view class="right-stats">
+            <view class="it">
+              <text class="iconfont icon-dianzan"></text>
+              <text class="text">2</text>
+            </view>
+            <view class="it">
+              <text class="iconfont icon-pinglun"></text>
+              <text class="text">2</text>
+            </view>
+            <view class="it">
+              <text class="iconfont icon-liulan"></text>
+              <text class="text">2</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </zj-page-layout>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        imgUrl: this.$imageUrl,
+        categoryList: [
+          {name: '家用空调', value: 1},
+          {name: '商用空调', value: 2},
+          {name: '冷冻空调', value: 3},
+          {name: '特种空调', value: 4},
+        ],
+        tabList: [
+          {name: '默认顺序', value: 1},
+          {name: '在售商品', value: 2},
+          {name: '离我最近', value: 3},
+          {name: '人气最高', value: 4},
+        ],
+        keyword: '',
+        dataList: [],
+        pageNum: 1,
+        refresherTriggered: false,
+      }
+    },
+
+    async onLoad() {
+      // await this.getList()
+    },
+
+    methods: {
+      //获取列表数据
+      async getList() {
+        this.$api.post('/xxx/xxxlist', {
+          pageNum: this.pageNum,
+          pageSize: 10,
+        }).then(res => {
+          this.loadStatus = 0;
+          let list = res.data.records;
+          if(list.length < 10){
+          	this.loadStatus = 2;
+          }
+          this.dataList = this.dataList.concat(list);
+        }).catch(() => {
+					this.loadStatus = 2;
+				}).finally(res => {
+					this.refresherTriggered = false;
+				})
+      },
+
+      // 滚动到底部
+      scrolltolower(e) {
+      	if (this.loadStatus === 0) {
+      		this.pageNum++;
+      		this.getList();
+      	}
+      },
+
+      // 触发下拉刷新
+      refresherrefresh(e) {
+      	this.refresherTriggered = true;
+      	this.dataList = [];
+      	this.pageNum = 1;
+      	this.getList();
+      },
+
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.header-container {
+  background: #ffffff;
+  padding: 0 30rpx;
+  ::v-deep .u-search {
+    margin-top: 20rpx !important;
+  }
+}
+.common-goods-list {
+  padding: 0 30rpx;
+  .item {
+    @include zj-card;
+  }
+}
+</style>

+ 184 - 0
src/pages/goods/order.vue

@@ -0,0 +1,184 @@
+<template>
+  <zj-page-layout :hasFooter="true">
+    <view class="address-container" @tap="$navPage(`/pages/mine/address/list?isChoose=1`)">
+    	<view class="left">
+    		<view class="icon"><text class="iconfont icon-dingwei1"></text></view>
+    		<view class="nodata" v-if="!hasAddress">选择收货地址</view>
+    		<view class="hasdata" v-else>
+    			<view class="name">{{addressInfo.name}}<text>{{addressInfo.phone}}</text></view>
+    			<view class="address ellipsis-2">{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.area}}{{addressInfo.street}}{{addressInfo.address}}{{addressInfo.houseNo}}</view>
+    		</view>
+    	</view>
+    	<text class="right iconfont icon-jinru"></text>
+    </view>
+
+    <view class="goods-container">
+      <view class="goods">
+        <image src="@/static/user/other_book.png"></image>
+        <view class="main">
+          <view class="name">商品名称</view>
+          <view class="des">商品描述</view>
+          <view class="bottom">
+          	<view class="price">¥1200.00</view>
+          	<u-number-box
+          		@tap.stop
+          		v-model="num"
+          		:min="1"
+          		:buttonSize="26"
+          		iconStyle="font-size: 12px;"
+          		:disabled="!hasAddress"
+          		@change="changeCount($event, index)">
+          	</u-number-box>
+          </view>
+        </view>
+      </view>
+      <view class="total">订单总金额<text>¥1200.00</text></view>
+    </view>
+
+    <template slot="footer">
+      <view class="bottom-container">
+      	<view class="left">
+          实付款:<text>¥1200.00</text>
+      	</view>
+      	<u-button type="primary" text="提交订单" @click="submitOrder"></u-button>
+      </view>
+    </template>
+
+  </zj-page-layout>
+</template>
+
+<script>
+</script>
+
+<style lang="scss" scoped>
+.address-container {
+  background: #FFFFFF;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 150rpx;
+  padding: 0 20rpx;
+  margin-top: 30rpx;
+  .right {
+    font-size: 36rpx;
+    flex-shrink: 0;
+    color: $sec-font;
+  }
+  .left {
+    display: flex;
+    align-items: center;
+    margin-right: 20rpx;
+    .icon {
+      width: 52rpx;
+      height: 52rpx;
+      border-radius: 50%;
+      background: $theme-color;
+      display: flex;
+      flex-shrink: 0;
+      justify-content: center;
+      align-items: center;
+      margin-right: 20rpx;
+      .iconfont {
+        font-size: 36rpx;
+        color: #ffffff;
+      }
+    }
+    .nodata {
+      font-size: 28rpx;
+      color: #999999;
+    }
+    .hasdata {
+      .name {
+        font-size: 32rpx;
+        color: #333333;
+        text {
+          color: #999999;
+          font-size: 28rpx;
+          margin-left: 16rpx;
+        }
+      }
+      .address {
+        font-size: 28rpx;
+        color: #666666;
+        line-height: 34rpx;
+        margin-top: 10rpx;
+      }
+    }
+  }
+}
+
+.goods-container {
+  background: #ffffff;
+  margin-top: 30rpx;
+  padding: 0 30rpx;
+  .goods {
+    display: flex;
+    padding: 30rpx 0;
+    image {
+      width: 120rpx;
+      height: 120rpx;
+    }
+    .main {
+      flex: 1;
+      margin-left: 20rpx;
+      .name {
+        font-size: 32rpx;
+      }
+      .des {
+        margin-top: 12rpx;
+        font-size: 28rpx;
+        color: $reg-font;
+      }
+      .bottom {
+      	display: flex;
+      	justify-content: space-between;
+      	align-items: center;
+        margin-top: 12rpx;
+      	.price {
+      		color: $assist-color;
+      		font-weight: 500;
+      		font-size: 32rpx;
+      		text {
+      			font-size: 24rpx;
+      		}
+      	}
+      	::v-deep .u-number-box {
+      		.u-number-box__minus, .u-number-box__plus {
+      			width: 26px;
+      		}
+      	}
+      }
+    }
+  }
+  .total {
+    border-top: 1px solid #eaeaea;
+    height: 80rpx;
+    display: flex;
+    align-items: center;
+    justify-content: end;
+    font-size: 28rpx;
+    text {
+      margin-left: 12rpx;
+      color: $assist-color;
+    }
+  }
+}
+
+.bottom-container {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 20rpx 30rpx;
+  .left {
+    flex-shrink: 0;
+    font-size: 28rpx;
+    text {
+      color: $assist-color;
+    }
+  }
+  ::v-deep .u-button {
+    width: 180rpx;
+    margin: 0;
+  }
+}
+</style>

+ 149 - 11
src/pages/index/index.vue

@@ -1,12 +1,92 @@
 <template>
-  <zj-page-layout
-  	:hasFooter="false"
-  	:isScroll="true"
-		:refresherTriggered="refresherTriggered"
-		@refresherrefresh="refresherrefresh"
-		@scrolltolower="scrolltolower">
-    <view>首页</view>
-  </zj-page-layout>
+  <view>
+    <view class="bg-container"></view>
+    <zj-page-layout
+    	:hasFooter="false"
+    	:isScroll="true"
+    	:refresherTriggered="refresherTriggered"
+    	@refresherrefresh="refresherrefresh"
+    	@scrolltolower="scrolltolower">
+      <template slot="header">
+        <view class="header-container">二手空调</view>
+      </template>
+
+      <view class="all-container">
+        <view class="search-container">
+          <u-search
+            placeholder="输入商品名称搜索"
+            :showAction="false"
+            clearabled
+            v-model="keyword">
+          </u-search>
+        </view>
+
+        <view class="swiper-container card mt30">
+          <u-swiper
+            :list="bannerList"
+            indicator
+            indicatorMode="line"
+            circular
+          ></u-swiper>
+        </view>
+
+        <view class="category-container card mt30">
+          <view class="item" v-for="(item, index) in categoryList" :key="index" @tap="$navPage(`/pages/goods/list`)">
+            <image src="@/static/user/icon_2.png"></image>
+            <view class="name">家用空调</view>
+          </view>
+        </view>
+
+        <view class="tab-container mt30">
+          <u-tabs
+            :list="tabList"
+            @click="click"
+            :scrollable="false"
+            lineColor="#01C30B">
+          </u-tabs>
+        </view>
+
+        <view class="common-goods-list">
+          <view class="item card" v-for="(item, index) in [1,2,3]" :key="index" @tap="$navPage(`/pages/goods/detail`)">
+            <view class="top">
+              <image src="@/static/common/logo.png"></image>
+              <view class="user">
+                <view class="name">张三</view>
+                <view class="time">23小时前发布</view>
+              </view>
+              <view class="price">¥1888.00</view>
+            </view>
+            <view class="title">商品名称</view>
+            <view class="des">商品描述</view>
+            <view class="imgs">
+              <image src="@/static/user/other_speech.png"></image>
+              <image src="@/static/user/other_speech.png"></image>
+              <image src="@/static/user/other_speech.png"></image>
+            </view>
+            <view class="bottom">
+              <view class="left-location">天河区棠下</view>
+              <view class="right-stats">
+                <view class="it">
+                  <text class="iconfont icon-dianzan"></text>
+                  <text class="text">2</text>
+                </view>
+                <view class="it">
+                  <text class="iconfont icon-pinglun"></text>
+                  <text class="text">2</text>
+                </view>
+                <view class="it">
+                  <text class="iconfont icon-liulan"></text>
+                  <text class="text">2</text>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+
+      </view>
+
+    </zj-page-layout>
+  </view>
 </template>
 
 <script>
@@ -17,6 +97,19 @@
         dataList: [],
         pageNum: 1,
         refresherTriggered: false,
+        keyword: '',
+        bannerList: [
+          'https://cdn.uviewui.com/uview/swiper/swiper3.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper2.png',
+          'https://cdn.uviewui.com/uview/swiper/swiper1.png',
+        ],
+        categoryList: [1,2,3,4],
+        tabList: [
+          {name: '默认顺序', value: 1},
+          {name: '在售商品', value: 2},
+          {name: '离我最近', value: 3},
+          {name: '人气最高', value: 4},
+        ],
       }
     },
 
@@ -43,7 +136,7 @@
 					this.refresherTriggered = false;
 				})
       },
-      
+
       // 滚动到底部
       scrolltolower(e) {
       	if (this.loadStatus === 0) {
@@ -51,7 +144,7 @@
       		this.getList();
       	}
       },
-      
+
       // 触发下拉刷新
       refresherrefresh(e) {
       	this.refresherTriggered = true;
@@ -65,5 +158,50 @@
 </script>
 
 <style lang="scss" scoped>
-
+.all-container {
+  padding: 0 30rpx 30rpx;
+}
+.header-container {
+  font-size: 32rpx;
+  color: #ffffff;
+  height: 88rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-weight: 600;
+  position: relative;
+}
+.bg-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 750rpx;
+  height: 750rpx;
+  background: linear-gradient(to bottom, $theme-color, #f4f2f2);
+}
+.card {
+  @include zj-card;
+}
+.swiper-container {
+  border-radius: 20rpx;
+  overflow: hidden;
+}
+.category-container {
+  display: flex;
+  padding: 30rpx 0;
+  .item {
+    width: 25%;
+    display: flex;
+    align-items: center;
+    flex-direction: column;
+    image {
+      width: 44rpx;
+      height: 44rpx;
+    }
+    .name {
+      font-size: 28rpx;
+      margin-top: 16rpx;
+    }
+  }
+}
 </style>

+ 1 - 1
src/pages/login/indexs.vue

@@ -103,7 +103,7 @@
         this.model.accountCode = value.usercode
         this.model.password = value.password
       }
-      this.getCode()
+      // this.getCode()
     },
     methods: {
       //存储账号密码

+ 536 - 0
src/pages/mine/address/form.vue

@@ -0,0 +1,536 @@
+<template>
+	<zj-page-layout :hasFooter="true">
+		<u-notice-bar direction="column" icon=" " :text="['地址信息仅用于上门服务,隐私信息将完全保密']"></u-notice-bar>
+
+		<view class="form-container">
+			<view class="clipboard">
+				<view class="box">
+					<u--textarea v-model="clipboard" border="none" placeholder="试试粘贴“收件人姓名,手机号,详细地址”,可快速识别您的用户及地址信息"></u--textarea>
+					<view class="btns">
+						<u-button text="清空" size="small" @click="clipboard = ''"></u-button>
+						<u-button type="primary" text="识别" size="small" @click="shibie"></u-button>
+					</view>
+				</view>
+			</view>
+			<view class="row">
+				<view class="title">联系人</view>
+				<view class="right input"><input type="text" placeholder="请输入联系人" v-model="formData.name"></view>
+			</view>
+			<view class="row">
+				<view class="title">手机号码</view>
+				<view class="right input"><input type="number" placeholder="请输入手机号码" v-model="formData.phone"></view>
+			</view>
+			<view class="row">
+				<view class="title">所在地区</view>
+				<view class="right">
+					<picker @change="onRegionChange" v-model="regionValue" mode="region">
+						<view class="picker">
+							<view v-if="regionValue.length">{{regionValue[0] + '/' +regionValue[1] + '/' +regionValue[2]}}</view>
+							<view v-else style="color: #666666;">请选择省/市/区</view>
+							<text class="iconfont icon-jinru"></text>
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="row">
+				<view class="title">所在街道</view>
+				<view class="right">
+					<picker @change="onStreetChange" :value="streetValue" :range="streetList" range-key="name" :disabled="!regionValue[2]">
+						<view class="picker">
+							<view v-if="streetValue !== ''">{{streetList[streetValue].name}}</view>
+							<view v-else style="color: #666666;">请选择街道</view>
+							<text class="iconfont icon-jinru"></text>
+						</view>
+					</picker>
+				</view>
+			</view>
+
+			<view class="row">
+				<view class="title">详细地址</view>
+				<view class="right textarea">
+					<textarea placeholder="请输入详细地址" auto-height v-model="formData.address"></textarea>
+					<view class="r" @tap="getLocation"><text class="iconfont icon-dingwei1"></text>定位</view>
+				</view>
+			</view>
+			<view class="row">
+				<view class="title">门牌号</view>
+				<view class="right input"><input type="text" placeholder="请输入门牌号" maxlength="15" v-model="formData.houseNo"></view>
+			</view>
+			<view class="row mt20">
+				<view class="title">设为默认</view>
+				<view class="right default"><switch @change="switchChange" color="#3D8FFD" v-model="formData.defaultAddr" :checked="formData.defaultAddr" style="transform:scale(0.7)" /></view>
+			</view>
+		</view>
+
+		<template slot="footer">
+			<view class="footer-btn-group">
+				<u-button text="删除" @click="handleDelete" v-if="editId"></u-button>
+				<u-button text="保存" type="primary" @click="submitForm"></u-button>
+			</view>
+		</template>
+	</zj-page-layout>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+	import {getArea} from '@/common/utils/util.js';
+
+	export default {
+		data() {
+			return {
+				editId: null, // 编辑的id
+				regionValue: [], // 省市区值
+				streetList: [],
+				streetValue: '',
+				formData: { // 表单数据
+					name: '',
+					phone: '',
+					province: '',
+					city: '',
+					area: '',
+					street: '',
+					address: '',
+					houseNo: '',
+					defaultAddr: false,
+				},
+				canClickSave: true, // 能否点击提交
+				clipboard: '',
+			}
+		},
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId'])
+		},
+		onLoad({id, addressData}) {
+			this.editId = id;
+			if(id) {
+				uni.setNavigationBarTitle({
+				  title: '编辑地址'
+				})
+				this.getAddressData();
+			}
+			if(addressData) {
+				addressData = JSON.parse(addressData);
+				this.formData = {
+					name: addressData.name,
+					phone: addressData.phone,
+					province: addressData.province,
+					city: addressData.city,
+					area: addressData.area,
+					address: addressData.address,
+					houseNo: addressData.houseNo,
+					defaultAddr: addressData.defaultAddr,
+				}
+				this.regionValue = [addressData.province, addressData.city, addressData.area];
+				this.getStreetList();
+			}
+		},
+		methods: {
+			async getRegion(address) {
+				const result = new Promise((resolve, reject) => {
+					this.$axios({
+						url: '/lbs/amap/region/query2',
+						method: 'post',
+						server: 'pc',
+						params: {
+							address
+						}
+					}).then(res => {
+						resolve(res.data);
+					})
+				})
+				return result;
+			},
+
+			async shibie() {
+				// 莫阿宝,13686123158,广东省广州市天河区棠下街道天河软件园
+				// console.log(this.smart(this.clipboard));
+				const data = this.smart(this.clipboard);
+
+				this.formData.name = data.name || '';
+				this.formData.phone = data.phone || '';
+
+				if(data.address) {
+					let addressData = await this.getRegion(data.address);
+					this.formData.province = addressData.provinceName || '';
+					this.formData.city = addressData.cityName || '';
+					this.formData.area = addressData.areaName || '';
+					this.formData.address = data.address.replace(`${addressData.provinceName || ''}${addressData.cityName || ''}${addressData.areaName || ''}${addressData.name || ''}`, '') || '';
+					this.regionValue = [addressData.provinceName || '', addressData.cityName || '', addressData.areaName || ''];
+					addressData.name && this.getStreetList(addressData.name);
+				}
+			},
+
+			smart(data) {
+				data = this.stripscript(data); //过滤特殊字符
+
+				let obj = {};
+				let copyData = JSON.parse(JSON.stringify(data)).split(" ");
+
+				copyData.forEach((item, index) => {
+					if (item) {
+						let addressObj = this.smartData(item);
+						console.log(addressObj)
+
+						obj = Object.assign(obj, addressObj);
+					}
+				});
+				return obj;
+			},
+
+			smartData(data) {
+				let smartObj = {};
+				//address=  data.replace(/\s/g, ''); //去除空格
+
+				// 手机号匹配(提取出手机号)
+				let phone = data.match(/(86-[1][0-9]{10}) | (86[1][0-9]{10})|([1][0-9]{10})/g);
+
+				// 如果存在手机号
+				if (phone) {
+					smartObj.phone = phone[0];
+
+					if(data != phone[0]) {
+						// 如果手机号是开头或结尾
+						if(data.startsWith(phone[0]) || data.endsWith(phone[0])) {
+							let remainData = data.replace(phone[0], ''); // 除了手机号,剩下的内容
+							// 如果还有剩下的内容
+							if(remainData) {
+								if (new RegExp(/省|市|区/).test(remainData)) {
+									smartObj.address = remainData;
+								} else {
+									smartObj.name = remainData;
+								}
+							}
+						}
+
+						// 如果手机号在中间
+						else {
+							let remainDatas = data.replace(phone[0], '&&').split('&&'); // 除了手机号,剩下的内容
+							for(let i = 0; i < remainDatas.length; i++) {
+								if(new RegExp(/省|市|区/).test(remainDatas[i])) {
+									smartObj.address = remainDatas[i];
+								}else {
+									smartObj.name = remainDatas[i];
+								}
+							}
+						}
+					}
+				}
+
+				// 如果不存在手机号
+				else {
+					if (new RegExp(/省|市|区/).test(data)) {
+						smartObj.address = data;
+					}
+					else {
+						smartObj.name = data;
+					}
+				}
+
+				return smartObj;
+			},
+
+			// 过滤特殊字符
+			stripscript(s) {
+				s = s.replace(/(\d{3})-(\d{4})-(\d{4})/g, "$1$2$3");
+				s = s.replace(/(\d{3}) (\d{4}) (\d{4})/g, "$1$2$3");
+				var pattern = new RegExp(
+					"[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“’。,、?-]"
+				);
+				var rs = "";
+				for (var i = 0; i < s.length; i++) {
+					rs = rs + s.substr(i, 1).replace(pattern, " ");
+				}
+				rs = rs.replace(/[\r\n]/g, "");
+				return rs;
+			},
+
+
+			// 获取地址信息
+			getAddressData() {
+				this.$axios({
+					url: '/user/address/detail',
+					method: 'get',
+					params: {
+						userAddressId: this.editId
+					}
+				}).then(res => {
+					this.formData = {
+						name: res.data.name,
+						phone: res.data.phone,
+						province: res.data.province,
+						city: res.data.city,
+						area: res.data.area,
+						address: res.data.address,
+						houseNo: res.data.houseNo,
+						defaultAddr: res.data.defaultAddr,
+					}
+					this.regionValue = [res.data.province, res.data.city, res.data.area];
+					this.getStreetList(res.data.street);
+				})
+			},
+
+
+			// 地图选点
+			getLocation() {
+				let that = this;
+				uni.chooseLocation({
+				    success: function (res) {
+				        console.log(res);
+						let SSQ_value = getArea(res.address);
+						if(!SSQ_value.Province) {
+							SSQ_value.Province = SSQ_value.City;
+						}
+						that.formData.province = SSQ_value.Province;
+						that.formData.city = SSQ_value.City;
+						that.formData.area = SSQ_value.Country;
+						let regionValue = [];
+						regionValue.push(SSQ_value.Province);
+						regionValue.push(SSQ_value.City);
+						regionValue.push(SSQ_value.Country);
+						that.regionValue = regionValue;
+						that.formData.address = res.address.slice(res.address.indexOf(SSQ_value.Country) + SSQ_value.Country.length) + res.name;
+						that.getStreetList();
+						that.streetValue = '';
+						that.formData.street = '';
+				    },
+					fail: function(res) {
+						uni.getSetting({
+							success: function(res) {
+								if (!res.authSetting['scope.userLocation']) {
+									uni.showModal({
+										title: '是否授权当前位置',
+										content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
+										success(tip) {
+											if (tip.confirm) {
+												uni.openSetting({
+													success: function(data) {
+														if (data.authSetting["scope.userLocation"] === true) {
+															that.$successToast('授权成功');
+															setTimeout(() => {
+																that.getLocation();
+															}, 1000)
+														}
+													}
+												})
+											}
+										}
+									})
+								}
+							}
+						})
+					}
+				});
+			},
+
+			// 切换省市区
+			onRegionChange(e) {
+				console.log(e.detail);
+				this.regionValue = e.detail.value;
+				this.formData.province = this.regionValue[0];
+				this.formData.city = this.regionValue[1];
+				this.formData.area = this.regionValue[2];
+				this.getStreetList();
+				this.streetValue = '';
+			},
+
+			// 获取街道列表
+			getStreetList(street) {
+				this.$axios({
+					url: '/common/street',
+					method: 'get',
+					params: {
+						province: this.regionValue[0],
+						city: this.regionValue[1],
+						area: this.regionValue[2],
+					}
+				}).then(res => {
+					this.streetList = res.data;
+					if(street) {
+						let index = this.findElem(this.streetList, 'name', street);
+						this.streetValue = index;
+						this.formData.street = street;
+					}
+				})
+			},
+
+			// 切换街道
+			onStreetChange(e) {
+				console.log(e.detail.value);
+				this.streetValue = e.detail.value;
+				this.formData.street = this.streetList[this.streetValue].name;
+			},
+
+			findElem(array, attr, val) {
+			    for (var i = 0; i < array.length; i++) {
+			        if (array[i][attr] == val) {
+			            return i; //返回当前索引值
+			        }
+			    }
+			    return -1;
+			},
+
+			switchChange(e) {
+				console.log(e.detail.value);
+				this.formData.defaultAddr = e.detail.value;
+			},
+
+			// 验证数据
+			vailateData() {
+				if(!this.formData.name) {
+					this.$toast('请填写姓名');
+					return false;
+				}
+				if(!this.formData.phone) {
+					this.$toast('请填写手机号码');
+					return false;
+				}
+				if(!(/^1[3456789]\d{9}$/.test(this.formData.phone))) {
+					this.$toast('请填写正确的手机号码');
+					return false;
+				}
+				if(!this.formData.province) {
+					this.$toast('请选择所在地区');
+					return false;
+				}
+				if(!this.formData.street) {
+					this.$toast('请选择所在街道');
+					return false;
+				}
+				if(!this.formData.address) {
+					this.$toast('请填写详细地址');
+					return false;
+				}
+				return true;
+			},
+
+			// 提交表单
+			submitForm() {
+				if (!this.canClickSave) return false;
+				this.canClickSave = false;
+				setTimeout(() => { this.canClickSave = true }, 3000)
+				if(!this.vailateData())return;
+
+				let params = this.formData;
+				params.userId = this.userId;
+				let url = '';
+				if(this.editId) {
+					params.userAddressId = this.editId;
+					url = '/user/address/update';
+				}else {
+					url = '/user/address/save';
+				}
+				this.$axios({
+					url: url,
+					type: 'json',
+					params,
+					isLoading: 1,
+				}).then(res => {
+					this.$successToast(this.editId? '编辑成功':'添加成功');
+					this.$backPage(1, 1000);
+				})
+			},
+
+			// 删除
+			handleDelete() {
+				this.$modal({
+					content: '确定要删除该地址吗?',
+				}).then(() => {
+					this.$axios({
+						url: '/user/address/del',
+						params: {
+							userAddressId: this.editId
+						},
+						isLoading: 1,
+					}).then(res => {
+						this.$successToast('删除成功');
+						this.$backPage(1, 1000);
+					})
+				}).catch(() => {})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.form-container {
+		.clipboard {
+			padding: 20rpx;
+			background: #FFFFFF;
+			.box {
+				background: #f5f5f5;
+				::v-deep .u-textarea {
+					background: none !important;
+				}
+				.btns {
+					padding: 20rpx;
+					display: flex;
+					justify-content: flex-end;
+					::v-deep .u-button {
+						width: 100rpx;
+						margin-left: 30rpx;
+						margin-right: 0;
+					}
+				}
+			}
+		}
+		.row {
+			background: #FFFFFF;
+			min-height: 88rpx;
+			padding: 0 20rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-bottom: 1px solid #f5f5f5;
+			.title {
+				flex-shrink: 0;
+				width: 160rpx;
+				font-size: 28rpx;
+				color: #333333;
+			}
+			.right {
+				flex: 1;
+				width: 0;
+				input {
+					font-size: 28rpx;
+				}
+				.picker {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					image {
+						width: 16rpx;
+						height: 28rpx;
+					}
+				}
+			}
+			.textarea {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				textarea {
+					padding: 10rpx 0;
+				}
+				.r {
+					display: flex;
+					align-items: center;
+					flex-shrink: 0;
+					font-size: 24rpx;
+					color: #666666;
+					margin-left: 15rpx;
+					.iconfont {
+						font-size: 36rpx;
+						color: #999999;
+						margin-right: 4rpx;
+					}
+				}
+			}
+			.default {
+				display: flex;
+				justify-content: flex-end;
+				switch {
+					margin-right: -20rpx;
+				}
+			}
+		}
+	}
+</style>

+ 164 - 0
src/pages/mine/address/list.vue

@@ -0,0 +1,164 @@
+<template>
+	<zj-page-layout
+		:hasFooter="true"
+		:isScroll="true"
+		:refresherTriggered="refresherTriggered"
+		@refresherrefresh="refresherrefresh">
+		<view class="list-container">
+			<block v-for="(item, index) in dataList" :key='index'>
+				<view class="item" @tap="chooseAddress(index)">
+					<view class="main">
+						<view class="top">
+							<view class="default" v-if="item.defaultAddr">默认</view>
+							<view class="text">{{item.province}} {{item.city}} {{item.area}} {{item.street}}</view>
+						</view>
+						<view class="address">{{item.address}}{{item.houseNo}}</view>
+						<view class="name">{{item.name}} {{item.phone}}</view>
+					</view>
+					<text class="iconfont icon-bianji" @tap.stop="$navPage('/pages/mine/address/form?id='+item.userAddressId)"></text>
+				</view>
+			</block>
+		</view>
+
+		<Loading
+			:type="2"
+			:loadStatus="loadStatus"
+			:dataList="dataList"
+		/>
+
+		<template slot="footer">
+			<view class="footer-btn-group">
+				<u-button text="获取地址" @click="getWxAddress"></u-button>
+				<u-button text="新增地址" type="primary" @click="$navPage('/pages/mine/address/form')"></u-button>
+			</view>
+		</template>
+	</zj-page-layout>
+</template>
+
+<script>
+	import {mapState} from 'vuex';
+
+	export default {
+		data() {
+			return {
+				dataList: [], // 收货地址列表
+				loadStatus: 0,
+				refresherTriggered: false, // 下拉刷新状态
+				isChoose: false, // 是否进来选择地址
+			}
+		},
+		computed:{
+			...mapState(['userInfo', 'isLogin', 'userId'])
+		},
+		onShow() {
+			this.getList();
+		},
+		onLoad({isChoose}) {
+			this.isChoose = isChoose;
+		},
+		methods: {
+			// 触发下拉刷新
+			async refresherrefresh(e) {
+				this.refresherTriggered = true;
+				this.dataList = [];
+				this.getList();
+			},
+
+			// 获取收货地址列表
+			getList() {
+				this.loadStatus = 1;
+				this.$api.get('/user/address/list', 
+          {
+						pageNum: 1,
+						pageSize: -1,
+						userId: this.userId
+					}).then(res => {
+					this.loadStatus = 0;
+					let list = res.data.records;
+					if(list.length < 1){
+						this.loadStatus = 2;
+					}
+					this.dataList = list;
+				}).catch(() => {
+					this.loadStatus = 2;
+				}).finally(res => {
+					this.refresherTriggered = false;
+				})
+			},
+
+			// 选择地址
+			chooseAddress(index) {
+				if(!this.isChoose) {
+					return false;
+				}
+				uni.$emit('chooseAddress', this.dataList[index]);
+				this.$backPage(1);
+			},
+
+			// 获取微信收货地址
+			getWxAddress() {
+				let that = this;
+				uni.chooseAddress({
+					success(res) {
+						let params = {
+							userId: that.userId,
+							name: res.userName,
+							phone: res.telNumber,
+							province: res.provinceName,
+							city: res.cityName,
+							area: res.countyName,
+							address: res.detailInfo,
+							houseNo: '',
+						}
+						that.$navPage('/pages/mine/address/form?addressData=' + JSON.stringify(params));
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.list-container {
+		background: #FFFFFF;
+		.item {
+			padding: 40rpx 30rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			border-top: 1px solid #f5f5f5;
+			.main {
+				.top {
+					display: flex;
+					align-items: center;
+					.default {
+						font-size: 22rpx;
+						color: $theme-color;
+						background: #E6F0FF;
+						padding: 6rpx 8rpx;
+						line-height: 20rpx;
+						margin-right: 12rpx;
+					}
+					.text {
+
+					}
+				}
+				.address {
+					font-size: 32rpx;
+					color: #333333;
+					line-height: 38rpx;
+					margin-top: 16rpx;
+				}
+				.name {
+					font-size: 24rpx;
+					color: $sec-font;
+					margin-top: 16rpx;
+				}
+			}
+			.iconfont {
+				font-size: 44rpx;
+				color: $sec-font;
+			}
+		}
+	}
+</style>

+ 89 - 99
src/pages/mine/index.vue

@@ -1,80 +1,79 @@
-<!-- 我的主页 -->
 <template>
-  <view class="container">
-    <u-navbar
-      title="我的"
-      bgColor="#ffffff"
-      titleStyle="color: #333333; font-weight: 500;"
-      placeholder
-      v-show="isCustom"
-      leftIcon="">
-    </u-navbar>
-
+  <view>
     <view class="bg-container"></view>
 
-    <view class="title-container">我的</view>
+    <zj-page-layout
+    	:hasFooter="false"
+    	:isScroll="true"
+    	:refresherTriggered="refresherTriggered"
+    	@refresherrefresh="refresherrefresh">
+      <template slot="header">
+        <view class="header-container">我的</view>
+      </template>
 
-    <view class="user-container card">
-      <view class="user">
-        <image src="@/static/common/logo.png" mode="aspectFill"></image>
-        <view class="main">
-          <view class="name">张三</view>
-          <view class="real">实名认证</view>
-        </view>
-      </view>
-      <view class="stats">
-        <view class="item" v-for="(item, index) in userStats" :key="index" @tap="$navPage(item.url)">
-          <view class="num">{{item.num}}</view>
-          <view class="text">{{item.name}}</view>
+      <view class="all-container">
+        <view class="user-container card">
+          <view class="user">
+            <image src="@/static/common/logo.png" mode="aspectFill"></image>
+            <view class="main">
+              <view class="name">张三</view>
+              <view class="real">实名认证</view>
+            </view>
+          </view>
+          <view class="stats">
+            <view class="item" v-for="(item, index) in userStats" :key="index" @tap="$navPage(item.url)">
+              <view class="num">{{item.num}}</view>
+              <view class="text">{{item.name}}</view>
+            </view>
+          </view>
         </view>
-      </view>
-    </view>
 
-    <view class="stats-container card">
-      <view class="top">
-        <view class="left">我发布的</view>
-        <view class="right">全部<text class="iconfont icon-jinru"></text></view>
-      </view>
-      <view class="stats">
-        <view class="item" v-for="(item, index) in issueStats" :key="index">
-          <view class="icon">
-            <text class="iconfont" :class="item.icon"></text>
-            <u-badge max="99" :value="item.num" :absolute="true" :offset="[-4, -4]"></u-badge>
+        <view class="stats-container card">
+          <view class="top">
+            <view class="left">我发布的</view>
+            <view class="right">全部<text class="iconfont icon-jinru"></text></view>
+          </view>
+          <view class="stats">
+            <view class="item" v-for="(item, index) in issueStats" :key="index">
+              <view class="icon">
+                <text class="iconfont" :class="item.icon"></text>
+                <u-badge max="99" :value="item.num" :absolute="true" :offset="[-4, -4]"></u-badge>
+              </view>
+              <view class="text">{{item.name}}</view>
+            </view>
           </view>
-          <view class="text">{{item.name}}</view>
         </view>
-      </view>
-    </view>
 
-    <view class="stats-container card">
-      <view class="top">
-        <view class="left">我买到的</view>
-        <view class="right">全部<text class="iconfont icon-jinru"></text></view>
-      </view>
-      <view class="stats">
-        <view class="item" v-for="(item, index) in buyStats" :key="index">
-          <view class="icon">
-            <text class="iconfont" :class="item.icon"></text>
-            <u-badge max="99" :value="item.num" :absolute="true" :offset="[-4, -4]"></u-badge>
+        <view class="stats-container card">
+          <view class="top">
+            <view class="left">我买到的</view>
+            <view class="right">全部<text class="iconfont icon-jinru"></text></view>
+          </view>
+          <view class="stats">
+            <view class="item" v-for="(item, index) in buyStats" :key="index">
+              <view class="icon">
+                <text class="iconfont" :class="item.icon"></text>
+                <u-badge max="99" :value="item.num" :absolute="true" :offset="[-4, -4]"></u-badge>
+              </view>
+              <view class="text">{{item.name}}</view>
+            </view>
           </view>
-          <view class="text">{{item.name}}</view>
         </view>
-      </view>
-    </view>
 
-    <view class="menu-container card">
-      <block v-for="(item, index) in pageList" :key="index">
-        <view class="item" v-if="item.url != 'contact'" @tap="$navPage(item.url)">
-          <view class="name">{{item.name}}</view>
-          <text class="iconfont icon-jinru"></text>
+        <view class="menu-container card">
+          <block v-for="(item, index) in pageList" :key="index">
+            <view class="item" v-if="item.url != 'contact'" @tap="$navPage(item.url)">
+              <view class="name">{{item.name}}</view>
+              <text class="iconfont icon-jinru"></text>
+            </view>
+            <button class="item" v-else open-type="contact" :plain="true">
+            	<view class="name">{{item.name}}</view>
+            	<text class="iconfont icon-jinru"></text>
+            </button>
+          </block>
         </view>
-        <button class="item" v-else open-type="contact" :plain="true">
-        	<view class="name">{{item.name}}</view>
-        	<text class="iconfont icon-jinru"></text>
-        </button>
-      </block>
-    </view>
-
+      </view>
+    </zj-page-layout>
   </view>
 </template>
 
@@ -82,8 +81,7 @@
 export default {
   data() {
     return {
-      scrollTop: 0, // 滚动高度(用于控制自定义导航)
-      isCustom: false, // 是否显示自定义导航
+      refresherTriggered: false,
       userInfo: uni.getStorageSync('recycle_mobile_user'),
 
       userStats: [
@@ -103,23 +101,17 @@ export default {
       ],
 
       pageList: [
-        { name: '我的地址', url: '' },
-        { name: '防骗指南', url: '' },
+        { name: '我的地址', url: '/pages/mine/address/list' },
+        { name: '防骗指南', url: '/pages/mine/parse?type=1' },
         { name: '联系客服', url: 'contact' },
-        { name: '隐私政策', url: '' },
-        { name: '用户协议', url: '' },
+        { name: '隐私政策', url: '/pages/mine/parse?type=2' },
+        { name: '用户协议', url: '/pages/mine/parse?type=3' },
       ],
     }
   },
 
   watch: {
-    scrollTop() {
-      if(this.scrollTop > 100) {
-        this.isCustom = true;
-      }else {
-        this.isCustom = false;
-      }
-    }
+
   },
 
   onShow() {
@@ -128,36 +120,26 @@ export default {
     })
   },
 
-  onPageScroll(res) {
-    this.scrollTop = res.scrollTop;
-  },
+  methods: {
+    // 触发下拉刷新
+    refresherrefresh(e) {
+    	this.refresherTriggered = true;
+
+    },
+  }
 }
 </script>
 
 <style lang="scss" scoped>
-.container {
-    margin-bottom: 20rpx;
-    // background-color: #fff;
-    overflow: auto;
+.all-container {
+  padding: 0 30rpx 30rpx;
 }
 
 .card {
-  background: #ffffff;
-  border-radius: 20rpx;
-  position: relative;
-  margin: 0 30rpx;
-}
-
-.bg-container {
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 750rpx;
-  height: 750rpx;
-  background: linear-gradient(to bottom, $theme-color, #f4f2f2);
+  @include zj-card;
 }
 
-.title-container {
+.header-container {
   font-size: 32rpx;
   color: #ffffff;
   height: 88rpx;
@@ -168,8 +150,16 @@ export default {
   position: relative;
 }
 
+.bg-container {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 750rpx;
+  height: 750rpx;
+  background: linear-gradient(to bottom, $theme-color, #f4f2f2);
+}
+
 .user-container {
-  margin-top: 10rpx;
   padding: 20rpx 20rpx 40rpx;
   .user {
     display: flex;

+ 3 - 65
src/pages/mine/myCollection.vue

@@ -5,7 +5,7 @@
   	:refresherTriggered="refresherTriggered"
   	@refresherrefresh="refresherrefresh"
   	@scrolltolower="scrolltolower">
-    <view class="list-container">
+    <view class="common-goods-list">
       <view class="item">
         <view class="top">
           <image src="@/static/common/logo.png"></image>
@@ -23,8 +23,8 @@
           <image src="@/static/user/other_speech.png"></image>
         </view>
         <view class="bottom">
-          <view class="location">天河区棠下</view>
-          <view class="right">
+          <view class="left-location">天河区棠下</view>
+          <view class="right-btn">
             <u-button text="取消收藏" shape="circle"></u-button>
           </view>
         </view>
@@ -89,67 +89,5 @@
 </script>
 
 <style lang="scss" scoped>
-.list-container {
-  .item {
-    margin-top: 30rpx;
-    background: #ffffff;
-    padding: 20rpx 30rpx;
-    .top {
-      display: flex;
-      align-items: center;
-      image {
-        width: 88rpx;
-        height: 88rpx;
-        border-radius: 50%;
-        flex-shrink: 0;
-      }
-      .user {
-        margin-left: 20rpx;
-        flex: 1;
-        .name {
 
-        }
-        .time {
-          color: $sec-font;
-          font-size: 24rpx;
-          margin-top: 8rpx;
-        }
-      }
-      .price {
-        color: $assist-color;
-      }
-    }
-    .title {
-      margin-top: 20rpx;
-    }
-    .des {
-      margin-top: 20rpx;
-    }
-    .imgs {
-      display: flex;
-      flex-wrap: wrap;
-      image {
-        width: 140rpx;
-        height: 140rpx;
-        margin-right: 20rpx;
-        margin-top: 20rpx;
-      }
-    }
-    .bottom {
-      border-top: 1px solid #eaeaea;
-      margin-top: 20rpx;
-      padding-top: 20rpx;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      .location {
-        font-size: 24rpx;
-        color: $sec-font;
-      }
-      .u-button {
-        height: 60rpx;
-      }
-    }
-  }
-}
 </style>

+ 3 - 65
src/pages/mine/myLike.vue

@@ -5,7 +5,7 @@
   	:refresherTriggered="refresherTriggered"
   	@refresherrefresh="refresherrefresh"
   	@scrolltolower="scrolltolower">
-    <view class="list-container">
+    <view class="common-goods-list">
       <view class="item">
         <view class="top">
           <image src="@/static/common/logo.png"></image>
@@ -23,8 +23,8 @@
           <image src="@/static/user/other_speech.png"></image>
         </view>
         <view class="bottom">
-          <view class="location">天河区棠下</view>
-          <view class="right">
+          <view class="left-location">天河区棠下</view>
+          <view class="right-btn">
             <u-button text="取消点赞" shape="circle"></u-button>
           </view>
         </view>
@@ -89,67 +89,5 @@
 </script>
 
 <style lang="scss" scoped>
-.list-container {
-  .item {
-    margin-top: 30rpx;
-    background: #ffffff;
-    padding: 20rpx 30rpx;
-    .top {
-      display: flex;
-      align-items: center;
-      image {
-        width: 88rpx;
-        height: 88rpx;
-        border-radius: 50%;
-        flex-shrink: 0;
-      }
-      .user {
-        margin-left: 20rpx;
-        flex: 1;
-        .name {
 
-        }
-        .time {
-          color: $sec-font;
-          font-size: 24rpx;
-          margin-top: 8rpx;
-        }
-      }
-      .price {
-        color: $assist-color;
-      }
-    }
-    .title {
-      margin-top: 20rpx;
-    }
-    .des {
-      margin-top: 20rpx;
-    }
-    .imgs {
-      display: flex;
-      flex-wrap: wrap;
-      image {
-        width: 140rpx;
-        height: 140rpx;
-        margin-right: 20rpx;
-        margin-top: 20rpx;
-      }
-    }
-    .bottom {
-      border-top: 1px solid #eaeaea;
-      margin-top: 20rpx;
-      padding-top: 20rpx;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      .location {
-        font-size: 24rpx;
-        color: $sec-font;
-      }
-      .u-button {
-        height: 60rpx;
-      }
-    }
-  }
-}
 </style>

+ 59 - 0
src/pages/mine/parse.vue

@@ -0,0 +1,59 @@
+<template>
+  <zj-page-layout
+  	:bgColor="'#FFFFFF'"
+  	:hasFooter="false"
+  	:isScroll="false">
+  	<view class="content">
+  		<u-parse :content="content" :tagStyle="style"></u-parse>
+  	</view>
+  </zj-page-layout>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				type: 1,
+				content: '',
+				style: {
+					p: 'font-size: 32rpx; line-height: 52rpx;',
+				}
+			}
+		},
+		onLoad({type}) {
+			this.type = type;
+      if(type == 1) {
+        uni.setNavigationBarTitle({
+          title: '防骗指南'
+        })
+      }else if(type == 2) {
+        uni.setNavigationBarTitle({
+          title: '隐私政策'
+        })
+      }else if(type == 3) {
+        uni.setNavigationBarTitle({
+          title: '用户协议'
+        })
+      }
+			
+			this.getDetail();
+		},
+		methods: {
+			getDetail() {
+				this.$api.get('/app/config/detail-by-type', {
+          configType: this.type
+        }).then(res => {
+					this.content = res.data ? res.data.content : '';
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		image {
+			width: 100%;
+		}
+	}
+</style>

+ 112 - 0
src/styles/common.scss

@@ -1 +1,113 @@
 
+@mixin zj-card {
+	background: #FFFFFF;
+	border-radius: 20rpx;
+	box-shadow: -10rpx 12rpx 96rpx 2rpx rgba(31, 36, 99, 0.1);
+	overflow: hidden;
+  position: relative;
+}
+
+.footer-btn-group {
+	padding: 25rpx 30rpx;
+	display: flex;
+	align-items: center;
+	::v-deep .u-button {
+		flex-shrink: 0;
+		font-size: 32rpx;
+		margin-right: 30rpx;
+		border-radius: 20rpx !important;
+		&:first-child {
+			flex: 1;
+		}
+		&:last-child {
+			width: 400rpx !important;
+			margin-right: 0;
+		}
+	}
+}
+
+.common-goods-list {
+  .item {
+    margin-top: 30rpx;
+    background: #ffffff;
+    padding: 20rpx 30rpx;
+    .top {
+      display: flex;
+      align-items: center;
+      image {
+        width: 88rpx;
+        height: 88rpx;
+        border-radius: 50%;
+        flex-shrink: 0;
+      }
+      .user {
+        margin-left: 20rpx;
+        flex: 1;
+        .name {
+
+        }
+        .time {
+          color: $sec-font;
+          font-size: 24rpx;
+          margin-top: 8rpx;
+        }
+      }
+      .price {
+        color: $assist-color;
+      }
+    }
+    .title {
+      margin-top: 20rpx;
+    }
+    .des {
+      margin-top: 20rpx;
+      font-size: 28rpx;
+      color: $reg-font;
+    }
+    .imgs {
+      display: flex;
+      flex-wrap: wrap;
+      image {
+        width: 140rpx;
+        height: 140rpx;
+        margin-right: 20rpx;
+        margin-top: 20rpx;
+      }
+    }
+    .bottom {
+      border-top: 1px solid #eaeaea;
+      margin-top: 20rpx;
+      padding-top: 20rpx;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      .left-location {
+        font-size: 24rpx;
+        color: $sec-font;
+      }
+      .right-btn {
+        .u-button {
+          height: 60rpx;
+        }
+      }
+      .right-stats {
+        display: flex;
+        align-items: center;
+        .it {
+          display: flex;
+          align-items: center;
+          margin-left: 16rpx;
+          .iconfont {
+            font-size: 28rpx;
+            color: $sec-font;
+          }
+          .text {
+            font-size: 24rpx;
+            margin-left: 4rpx;
+            color: $sec-font;
+          }
+        }
+      }
+    }
+  }
+}

+ 39 - 3
src/styles/iconfont.css

@@ -1,9 +1,9 @@
 /* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
 @font-face {
   font-family: 'iconfont';  /* Project id 4308323 */
-  src: url('https://at.alicdn.com/t/c/font_4308323_1d4707qto5j.woff2?t=1698659322164') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_4308323_1d4707qto5j.woff?t=1698659322164') format('woff'),
-       url('https://at.alicdn.com/t/c/font_4308323_1d4707qto5j.ttf?t=1698659322164') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_4308323_zf22lmymn5.woff2?t=1698736545710') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_4308323_zf22lmymn5.woff?t=1698736545710') format('woff'),
+       url('https://at.alicdn.com/t/c/font_4308323_zf22lmymn5.ttf?t=1698736545710') format('truetype');
 }
 
 .iconfont {
@@ -14,6 +14,42 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-dingwei1:before {
+  content: "\e603";
+}
+
+.icon-dianzan2:before {
+  content: "\ec8c";
+}
+
+.icon-shoucang2:before {
+  content: "\e601";
+}
+
+.icon-shoucang:before {
+  content: "\e602";
+}
+
+.icon-dingwei:before {
+  content: "\e609";
+}
+
+.icon-bianji:before {
+  content: "\e8ac";
+}
+
+.icon-pinglun:before {
+  content: "\e600";
+}
+
+.icon-liulan:before {
+  content: "\e693";
+}
+
+.icon-dianzan:before {
+  content: "\ec7f";
+}
+
 .icon-jinru:before {
   content: "\e60c";
 }

+ 4 - 1
src/styles/index.scss

@@ -14,10 +14,13 @@ view {
   overflow: hidden;
 }
 
+.mt10 {margin-top: 10rpx;}
+.mt20 {margin-top: 20rpx;}
+.mt30 {margin-top: 30rpx;}
+.mt40 {margin-top: 40rpx;}
 
 .flex {
     display: flex;
-
 }
 .t-border::before {
     content: '';

+ 2 - 1
src/uni.scss

@@ -13,8 +13,9 @@
  *
  * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  */
-
+
 /* 颜色变量 */
+$u-primary: #01C30B;
 
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;