Explorar el Código

Merge branch 'main' of https://gitlab.com/tea28/client

hejie hace 3 años
padre
commit
99235bbdca

+ 2 - 0
src/components/goodsList.vue

@@ -39,9 +39,11 @@ export default {
             productList: [], //商品数据
         };
     },
+    onShow(){},
     created() {
         this.loadData();
     },
+    mounted () {},
     methods: {
         loadData(page) {
             post("goods/goodsList",{

+ 5 - 6
src/pages/index/index.vue

@@ -73,14 +73,13 @@ export default {
             // goodslistUrl: "ShuZiTeaYW/shop/getGoodsLikeByUserId", //首页商品列表
         };
     },
-    onLoad(option) {
-        this.getBanner(); //获取轮播图
-        this.getAnnounce(); //获取公告列表
-        this.getImageTwo(); //金刚区
-        this.getImage(); //获取活动列表
-    },
+    onLoad(option) {},
     onLaunch() {},
     onShow() {
+        // this.getBanner(); //获取轮播图
+        // this.getAnnounce(); //获取公告列表
+        // this.getImageTwo(); //金刚区
+        // this.getImage(); //获取活动列表
     },
     onHide() {},
     methods: {

+ 7 - 7
src/pages/product/p_details.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="container">
 		<!-- 轮播图 -->
-		<!-- <swiper-banner
+		<swiper-banner
 			imgScale="25:17"
-			:imgArr='detail.goodsPlayImage'
+			:imgArr='detail.goods_img'
 			:duration="1000"
 			:interval="5000" 
 			:circular="true" 
@@ -11,7 +11,7 @@
 			:indicator-dots="true"
 			indicator-active-color="#12B280"
 			indicator-color="rgba(255, 255, 255, .82)" 
-		></swiper-banner> -->
+		></swiper-banner>
 		<!-- 轮播图-end -->
 		
 		<!-- 价格信息栏 -->
@@ -26,7 +26,7 @@
 		
 		<!-- 标题信息栏 -->
 		<view class="title_info">
-			<view class="goods_name">{{ detail.goods.goods_name}}</view>
+			<view class="goods_name">{{ detail.goods_name}}</view>
 			<view class="goods_subName">{{detail.goodsMsg}}</view>
 		</view>
 		<!-- 标题信息栏-end -->
@@ -35,7 +35,7 @@
 		<view class="brief mar_t20">
 			<view class="brief_title flex_r flex_ac">产品简介</view>
 			<view class="brief_con">
-				<jyfParser :html="detail.goods.goods_content" ref="jyf"></jyfParser>
+				<jyfParser :html="detail.goods_content" ref="jyf"></jyfParser>
 				<!-- <image :lazy-load="true" style="width: 100%;display: block;" v-for="(item,index) in detail.goodsDetailesImage" :key="index" :src="item" mode="widthFix"></image> -->
 			</view>
 		</view>
@@ -57,9 +57,9 @@
 					<image class="close_img" src="/static/close.png" @tap="closeBtn" mode=""></image>
 				</view>
 				<view class="goods_info flex_r">
-					<image class="goods_img" :src="detail.goods.original_img" mode=""></image>
+					<image class="goods_img" :src="detail.original_img" mode=""></image>
 					<view class="goods_con flex_c flex_jb">
-						<view class="shop_names">{{detail.goods.goods_name}}</view>
+						<view class="shop_names">{{detail.goods_name}}</view>
 						<!-- <view class="goods_msg">{{type == 2 ? detail.pfCombination : '¥' + detail.price}}</view> -->
 						<view class="num_con flex_r flex_je">
 							<uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>

+ 11 - 6
src/pages/to-pay-list/index.vue

@@ -17,7 +17,7 @@
 				<view class="add_name mar_t20">{{DefaultAddress.address}}</view>
 			</block>
 			<block v-else>
-				<view class="add_address flex_c flex_ac flex_jc" @tap="chooseWXaddress">
+				<view class="add_address flex_c flex_ac flex_jc" @tap="chooseWXaddress('add')">
 					<image class="add_icon" src="/static/img/add.png" mode=""></image>
 					<view class="add_text">添加收货地址</view>
 				</view>
@@ -29,9 +29,9 @@
 		<view class="goods_info mar_t20">
 			<view class="info_type">{{modularName}}</view>
 			<view class="goods flex_r">
-				<image class="goods_img" :src="goodsInfo.goods.original_img" mode=""></image>
+				<image class="goods_img" :src="goodsInfo.original_img" mode=""></image>
 				<view class="goods_con flex_c flex_jc flex_jb">
-					<view class="goods_name ellipsis2">{{goodsInfo.goods.goods_name}}</view>
+					<view class="goods_name ellipsis2">{{goodsInfo.goods_name}}</view>
 					<view class="flex_r flex_ac flex_jb">
 						<view class="goods_msg">{{Data.type == 2 ? goodsInfo.trade_num + '消费积分' + '¥' + goodsInfo.trade_price : '¥' + goodsInfo.cost_price}}</view>
 						<view class="goods_num">x {{Data.num}}</view>
@@ -95,7 +95,7 @@
 		<!-- 底部操作栏-end -->
 
 		<!-- 收获地址弹窗 -->
-		<userAddress ref="userAddress" @addressConfirm="loadAddress" />
+		<userAddress ref="userAddress" @addressConfirm="loadDa" />
 
 	</view>
 </template>
@@ -166,8 +166,9 @@ import userAddress from "pages/xghc-addrress/userAddress"
 					}
                 })
 			},
-			chooseWXaddress() {
-				this.$refs.userAddress.open();
+			chooseWXaddress(va) {
+				let a = va != "add" ? this.DefaultAddress.id : 'add'
+				this.$refs.userAddress.open(a);
 				// this.goto("/pages/xghc-addrress/userAddress");
 			},
 			// 支付
@@ -183,6 +184,10 @@ import userAddress from "pages/xghc-addrress/userAddress"
 
 				})
 			},
+
+			loadDa(da){
+				this.DefaultAddress = da;
+			}
 		}
 	}
 </script>

+ 432 - 379
src/pages/xghc-addrress/userAddress.vue

@@ -1,399 +1,452 @@
 <template>
-	<uni-popup ref="popup" type="bottom">
-		<view class="container">
-			<div class="tit">
-				<text class="close">关闭</text>
-			</div>
-			<form @submit="formSubmit" v-if="isadd">
-				<view class='addAddress'>
-					<view class="pad30">
-						<view class='default acea-row row-middle borderRadius15'>
-							<uni-easyinput type="textarea" v-model="addressValue" placeholder="粘贴地址信息,自动拆分姓名、电话和地址" @blur="identify()" />
-						</view>
-					</view>
-					<view class="pad30 mt-22">
-						<view class='list borderRadius15'>
-							<view class='item acea-row row-between-wrapper'>
-								<view class='name'>姓名</view>
-								<input type='text' placeholder='请输入姓名' name='real_name' v-model="userAddress.real_name"
-									placeholder-class='placeholder' />
-							</view>
-							<view class='item acea-row row-between-wrapper'>
-								<view class='name'>联系电话</view>
-								<input type='number' placeholder='请输入联系电话' name="phone" v-model='userAddress.phone'
-									placeholder-class='placeholder' pattern="\d*" />
-							</view>
-							<view class='item acea-row row-between-wrapper'>
-								<view class='name'>所在地区</view>
-								<view class="address acea-row row-between">
-									<input type='text' placeholder='请填写具体地址' name='region' placeholder-class='placeholder'
-										v-model='userAddress.region' class="detail" />
-								</view>
-							</view>
-							<view class='item acea-row row-between-wrapper'>
-								<view class='name'>详细地址</view>
-								<view class="address">
-									<input type='text' placeholder='请填写具体地址' name='detail' placeholder-class='placeholder'
-										v-model='userAddress.detail' class="detail" />
-								</view>
-							</view>
-							<view class='item acea-row row-between-wrapper'>
-								<view class='name'>详细地址</view>
-								<view class="address">
-									<uni-data-checkbox v-model="is_default" :localdata="range"></uni-data-checkbox>
-								</view>
-							</view>
-						</view>
-					</view>
-					<button class='keepBnt bg-color' form-type="submit">立即保存</button>
-				</view>
-			</form>
-
-			<div class="editaddress" v-else>
-				<view class="addbar" @click="isadd = true">
-					<text class="iconfont sp">&#xe760;</text>
-					<text class="sp">添加地址</text>
-				</view>
-				<uni-swipe-action class="swipeAction">
-					<uni-swipe-action-item class="swipeAction_item" v-for="(i,s) in addressList" :key="s">
-						<view class="addressLi clearfix" @click="onSelect(i,s)">
-							<view class="addressLi_l">
-								<text v-if="i.status != 1" class="iconfont">&#xe623;</text>
-								<text v-else class="iconfont pitchOn">&#xe624;</text>
-							</view>
-							<view class="addressLi_r">
-								<view class="user">
-									<text class="name">{{i.name}}</text>
-									<text>{{i.mobile}}</text>
-								</view>
-								<view class="address">{{i.address}}</view>
-							</view>
-						</view>
-						<template v-slot:right>
-							<view class="btns clearfix">
-								<view class="btn edit"><text class="iconfont">&#xe600;</text></view>
-								<view class="btn del"><text class="iconfont">&#xe601;</text></view>
-							</view>
-						</template>
-					</uni-swipe-action-item>
-				</uni-swipe-action>
-			</div>
-
-		</view>
-	</uni-popup>
+    <uni-popup ref="popup" type="bottom">
+        <view class="container">
+            <div class="tit clearfix">
+                <text class="cancel" v-if="isadd" @click="isadd = false">取消</text>
+                <text class="close" @click="close">关闭</text>
+            </div>
+            <form @submit="formSubmit" v-if="isadd">
+                <view class='addAddress'>
+                    <view class="pad30">
+                        <view class='default acea-row row-middle borderRadius15'>
+                            <uni-easyinput type="textarea" v-model="addressValue" placeholder="粘贴地址信息,自动拆分姓名、电话和地址" @blur="identify()" placeholder-class='placeholder' />
+                        </view>
+                    </view>
+                    <view class="pad30 mt-22">
+                        <view class='list borderRadius15'>
+                            <view class='item acea-row row-between-wrapper'>
+                                <view class='name'>姓名</view>
+                                <input type='text' placeholder='请输入姓名' name='real_name' v-model="userAddress.real_name" placeholder-class='placeholder' />
+                            </view>
+                            <view class='item acea-row row-between-wrapper'>
+                                <view class='name'>联系电话</view>
+                                <input type='number' placeholder='请输入联系电话' name="phone" v-model='userAddress.phone' placeholder-class='placeholder' pattern="\d*" />
+                            </view>
+                            <view class='item acea-row row-between-wrapper'>
+                                <view class='name'>所在地区</view>
+                                <view class="address acea-row row-between">
+                                    <input type='text' placeholder='请填写具体地址' name='region' placeholder-class='placeholder' v-model='userAddress.region' class="detail" />
+                                </view>
+                            </view>
+                            <view class='item acea-row row-between-wrapper'>
+                                <view class='name'>详细地址</view>
+                                <view class="address">
+                                    <input type='text' placeholder='请填写具体地址' name='detail' placeholder-class='placeholder' v-model='userAddress.detail' class="detail" />
+                                </view>
+                            </view>
+                            <view class='item acea-row row-between-wrapper'>
+                                <view class='name'>详细地址</view>
+                                <view class="address">
+                                    <uni-data-checkbox v-model="is_default" :localdata="range"></uni-data-checkbox>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                    <button class='keepBnt bg-color' form-type="submit">立即保存</button>
+                </view>
+            </form>
+            <div class="editaddress" v-else>
+                <view class="addbar" @click="onadd">
+                    <text class="iconfont sp">&#xe760;</text>
+                    <text class="sp">添加地址</text>
+                </view>
+                <uni-swipe-action class="swipeAction">
+                    <uni-swipe-action-item class="swipeAction_item" v-for="(i,s) in addressList" :key="s">
+                        <view class="addressLi clearfix" @click="onSelect(i,s)">
+                            <view class="addressLi_l">
+                                <text v-if="i.id != presentId" class="iconfont">&#xe623;</text>
+                                <text v-else class="iconfont pitchOn">&#xe624;</text>
+                            </view>
+                            <view class="addressLi_r">
+                                <view class="user">
+                                    <text class="name">{{i.name}}</text>
+                                    <text>{{i.mobile}}</text>
+                                    <text v-if="i.status == 1" class="defaultAddress">默认</text>
+                                </view>
+                                <view class="address">{{i.address}}</view>
+                            </view>
+                        </view>
+                        <template v-slot:right>
+                            <view class="btns clearfix">
+                                <view class="btn edit" @click="onedit(i)"><text class="iconfont">&#xe600;</text></view>
+                                <view class="btn del" @click="delAddress(i.id)"><text class="iconfont">&#xe601;</text></view>
+                            </view>
+                        </template>
+                    </uni-swipe-action-item>
+                </uni-swipe-action>
+            </div>
+        </view>
+    </uni-popup>
 </template>
 <script>
 import { get, post, u_post } from "@/request/api.js";
-	import AddressParse from './zh-address-parse.min.js'
+import AddressParse from './zh-address-parse.min.js'
 let app = getApp();
 var appEv = app.$vm.$options;
-	export default {
-		data() {
-			return {
-				userAddress: {
-					real_name:"",
-					phone:"",
-					region:"",
-					detail:"",
-				}, //地址详情
-				addressValue:"",
-				is_default: 0, //是否设为默认地址
-				range: [{"value": 0,"text": "否"	},{"value": 1,"text": "是"}],
-				
-				isadd: false,
-				addressList: [],
-			}
+export default {
+    data() {
+        return {
+            userAddress: {
+                real_name: "",
+                phone: "",
+                region: "",
+                detail: "",
+            }, //地址详情
+            addressValue: "",
+            is_default: 0, //是否设为默认地址
+            range: [{ "value": 0, "text": "否" }, { "value": 1, "text": "是" }],
+
+            isadd: false,
+            addressList: [],
+			presentId: "", //当前选择地址的id
+        }
+    },
+    components: {},
+    created() {
+        this.loadAddress();
+    },
+    methods: {
+        identify() {
+            const options = {
+                type: 0, // 哪种方式解析,0:正则,1:树查找
+                textFilter: [], // 预清洗的字段
+                nameMaxLength: 4, // 查找最大的中文名字长度
+            }
+            // type参数0表示使用正则解析,1表示采用树查找, textFilter地址预清洗过滤字段。
+            if (!!this.addressValue) {
+                const parseResult = AddressParse(this.addressValue, options)
+                // console.log(parseResult);
+                this.userAddress.real_name = parseResult.name;
+                this.userAddress.phone = parseResult.phone;
+                this.userAddress.detail = parseResult.detail;
+                this.userAddress.region = parseResult.province + '/' + parseResult.city + '/' + parseResult.area;
+            }
+        },
+        formSubmit() {
+			let url;
+			let data = {
+                address: this.userAddress.region + this.userAddress.detail,
+                mobile: this.userAddress.phone,
+                name: this.userAddress.real_name,
+                is_default: this.is_default
+            }
+			if(this.userAddress.id){
+				url = "user/editAddress";
+				data.id = this.userAddress.id
+			}else url = "user/addAddress";
+            post(url, data).then(res => {
+                if (res.code === 0) {
+                    appEv.errTips(res.msg);
+					this.loadAddress();
+					this.isadd = false;
+                }
+            })
+        },
+        // 获取用户地址
+        loadAddress() {
+            post("user/addressList").then(res => {
+                if (res.code === 0) {
+                    this.addressList = res.data.data;
+                }
+            })
+        },
+        onSelect(i, s) {
+			this.presentId = i.id;
+			this.$emit('addressConfirm', i);
+			this.close();
+        },
+		onadd(){
+			this.isadd = true;
+			this.userAddress = {};
 		},
-		components:{},
-		created () {
-			this.loadAddress();
+		onedit(da){
+            let options = {
+                type: 0, // 哪种方式解析,0:正则,1:树查找
+                textFilter: [], // 预清洗的字段
+                nameMaxLength: 4, // 查找最大的中文名字长度
+            }
+			let parseResult = AddressParse(da.address, options)
+			this.userAddress.id = da.id;
+			this.userAddress.real_name = da.name;
+			this.userAddress.phone = da.mobile;
+			this.userAddress.detail = parseResult.detail;
+			this.userAddress.region = parseResult.province + '/' + parseResult.city + '/' + parseResult.area;
+			this.isadd = true
 		},
-		methods: {
-			identify(){
-				const options = {
-				  type: 0, // 哪种方式解析,0:正则,1:树查找
-				  textFilter: [], // 预清洗的字段
-				  nameMaxLength: 4, // 查找最大的中文名字长度
-				}
-				// type参数0表示使用正则解析,1表示采用树查找, textFilter地址预清洗过滤字段。
-				if(!!this.addressValue){
-					const parseResult = AddressParse(this.addressValue, options)
-					// console.log(parseResult);
-					this.userAddress.real_name = parseResult.name;
-					this.userAddress.phone = parseResult.phone;
-					this.userAddress.detail = parseResult.detail;
-					this.userAddress.region = parseResult.province + '/' + parseResult.city + '/' + parseResult.area;
+		delAddress(id) {
+			post("user/delAddress",{id}).then(res=>{
+                if (res.code === 0) {
+                    appEv.errTips(res.msg);
+					this.loadAddress();
 				}
-			},
-			formSubmit(){
-				post("user/addAddress",{
-					address: this.userAddress.region + this.userAddress.detail,
-					mobile: this.userAddress.phone,
-					name: this.userAddress.real_name,
-					is_default: this.is_default
-				}).then(res => {
-                	if (res.code === 0) {
-						appEv.errTips(res.msg);
-						setTimeout(() => {
-						// 	uni.navigateBack();
-							this.$emit('addressConfirm');
-							this.close();
-						}, 1500);
-					}
-				})
-			},
-			// 获取用户地址
-			loadAddress(){
-				post("user/addressList").then(res => {
-                    if(res.code === 0){
-						this.addressList = res.data.data;
-					}
-                })
-			},
-			onSelect(i,s){
-				this.addressList.forEach(e => {
-					e.status = "0";
-				});
-				this.addressList[s].status = "1";
-				this.editAddress();
-			},
-			editAddress(){
-				this.addressList.forEach((e,s) => {
-					post("user/editAddress",{
-						...e, is_default: e.status
-					}).then(res=>{
-						if(this.addressList.length == s+1){
-							this.$emit('addressConfirm');
-							this.close();
-						}
-					})
-				});
-			},
-
-			open(type) {
-				this.$refs.popup.open('bottom')
-				if(type == "add") this.isadd = true
-			},
-			close() {
-				this.$refs.popup.close()
-			}
+			})
 		},
-	}
+
+        open(da) {
+            this.$refs.popup.open('bottom')
+            if (da == "add") this.isadd = true
+			else {
+				this.isadd = false;
+				this.presentId = da;
+			}
+        },
+        close() {
+            this.$refs.popup.close()
+        }
+    },
+}
 </script>
 <style lang="scss" scoped>
-	.container{
-		background-color: #f5f5f5;
-		height: 70vh;
-		// padding:30rpx 0;
-		border-radius: 30rpx 30rpx 0 0;
-	}
-	
-	.pad30 {
-		padding: 0 30rpx
-	}
-	
-	.p_center {
-		text-align: center;
-	}
-	
-	.acea-row {
-		display: flex;
-	}
-	.row-middle {
-		align-items: center
-	}
-	.row-between-wrapper {
-		align-items: center;
-		justify-content: space-between
-	}
-	.borderRadius15 {
-		border-radius: 15rpx !important;
-	}
-	.fontcolor{
-		color: var(--view-theme);
-	}
-	.addAddress .list {
-		background-color: #fff;
-	}
-	
-	.addAddress .list .item {
-		padding: 30rpx;
-		border-top: 1rpx solid #eee;
-		position: relative;
-	}
-	
-	.addAddress .list .item .detail{
-		width: 368rpx;
-	}
-	
-	.addAddress .list .item .location{
-		position: absolute;
-		right: 46rpx;
-		top: 50%;
-		margin-top: -40rpx!important;
-		font-size: 24rpx;
-		text-align: center;
-	}
-	
-	.addAddress .list .item .icon-dizhi{
-		 font-size: 36rpx!important;
-	}
-	
-	.addAddress .list .item .name {
-		width: 195rpx;
-		font-size: 30rpx;
-		color: #333;
-	}
-	
-	.addAddress .list .item .address {
-		flex: 1;
-	}
-	
-	.addAddress .list .item .address .addressCon{
-		width: 360rpx;
-	}
-	
-	.addAddress .list .item .address .addressCon .tip{
-		font-size: 21rpx;
-		margin-top: 4rpx;
-	}
-	
-	.addAddress .list .item input {
-		/* // width: 475rpx; */
-		flex: 1;
-		font-size: 30rpx;
-	}
-	
-	.placeholder {
-		color: #ccc;
-	}
-	
-	.addAddress .list .item .picker {
-		width: 430rpx;
-		font-size: 30rpx;
-	}
-	
-	.addAddress .list .item .iconfont {
-		font-size: 30rpx;
-		margin-top: 4rpx;
-	}
-	
-	.addAddress .default {
-		padding: 30rpx;
-		/* height: 90rpx; */
-		background-color: #fff;
-	}
-	
-	.addAddress .default checkbox {
-		margin-right: 15rpx;
-	}
-	
-	.addAddress .keepBnt {
-		width: 690rpx;
-		height: 86rpx;
-		border-radius: 50rpx;
-		text-align: center;
-		line-height: 86rpx;
-		margin: 50rpx auto;
-		font-size: 32rpx;
-		color: #fff;
-	}
-	
-	
-	.mt-22{
-		margin-top: 22rpx;
-	}
-	.bg-color {
-		background-color: #2DB389;
-	}
+.container {
+    background-color: #f5f5f5;
+    height: 70vh;
+    // padding:30rpx 0;
+    border-radius: 30rpx 30rpx 0 0;
+}
 
-	.addbar{
-		background: #fff;
-		text-align: center;
-		margin-bottom: 50rpx;
-		padding: 36rpx 0;
-		.iconfont{
-			font-size: 46rpx;
-			margin-right: 20rpx;
-		}
-		.sp{
-			vertical-align: middle;
-		}
-	}
+.pad30 {
+    padding: 0 30rpx
+}
 
-	.swipeAction{
-		// padding: 20rpx 30rpx;
-		font-size: 28rpx;
-
-		.addressLi{
-			.addressLi_l{
-				width: 80rpx;
-				height: 80rpx;
-				display: flex;
-				// justify-content: center;
-				align-items: center;
-				.iconfont{
-					color: #666;
-					font-size: 38rpx;
-				}
-				.pitchOn{
-					color: #1989fa;
-				}
-			}
-			.addressLi_r{
-				width: calc(100% - 80rpx);
-			}
-			.addressLi_l,.addressLi_r{
-				float: left;
-			}
-			.user{
-				margin-bottom: 10rpx;
-			}
-			.name{
-				// font-weight: bold;
-				font-size: 32rpx;
-				margin-right: 10rpx;
-			}
-			.address{
-				font-size: 24rpx;
-				color: #999;
-			}
-		}
+.p_center {
+    text-align: center;
+}
 
-		.swipeAction_item{
-			background: #fff;
-			margin-bottom: 20rpx;
-		}
+.acea-row {
+    display: flex;
+}
 
-		.btns{
-			.btn{
-				float: left;
-				display:flex;
-				justify-content : center;
-				align-items : center; 
-				height: 100%;
-				padding: 0 30rpx;
-				color: #fff;
-				font-size: 36rpx;
-				
-			}
-			.edit{
-				background: rgba(25,137,250,0.5);
-			}
-			.del{
-				background: rgba(238,10,36,0.5);
-			}
-		}
-	}
+.row-middle {
+    align-items: center
+}
 
-	::v-deep .uni-swipe_box{
-		padding: 20rpx 30rpx;
-	}
+.row-between-wrapper {
+    align-items: center;
+    justify-content: space-between
+}
+
+.borderRadius15 {
+    border-radius: 15rpx !important;
+}
+
+.fontcolor {
+    color: var(--view-theme);
+}
+
+.addAddress .list {
+    background-color: #fff;
+}
+
+.addAddress .list .item {
+    padding: 30rpx;
+    border-top: 1rpx solid #eee;
+    position: relative;
+}
+
+.addAddress .list .item .detail {
+    width: 368rpx;
+}
+
+.addAddress .list .item .location {
+    position: absolute;
+    right: 46rpx;
+    top: 50%;
+    margin-top: -40rpx !important;
+    font-size: 24rpx;
+    text-align: center;
+}
+
+.addAddress .list .item .icon-dizhi {
+    font-size: 36rpx !important;
+}
+
+.addAddress .list .item .name {
+    width: 195rpx;
+    font-size: 30rpx;
+    color: #333;
+}
+
+.addAddress .list .item .address {
+    flex: 1;
+}
+
+.addAddress .list .item .address .addressCon {
+    width: 360rpx;
+}
+
+.addAddress .list .item .address .addressCon .tip {
+    font-size: 21rpx;
+    margin-top: 4rpx;
+}
+
+.addAddress .list .item input {
+    /* // width: 475rpx; */
+    flex: 1;
+    font-size: 30rpx;
+}
+
+.placeholder {
+    color: #ccc;
+}
+
+.addAddress .list .item .picker {
+    width: 430rpx;
+    font-size: 30rpx;
+}
+
+.addAddress .list .item .iconfont {
+    font-size: 30rpx;
+    margin-top: 4rpx;
+}
+
+.addAddress .default {
+    padding: 30rpx;
+    /* height: 90rpx; */
+    background-color: #fff;
+}
+
+.addAddress .default checkbox {
+    margin-right: 15rpx;
+}
+
+.addAddress .keepBnt {
+    width: 690rpx;
+    height: 86rpx;
+    border-radius: 50rpx;
+    text-align: center;
+    line-height: 86rpx;
+    margin: 50rpx auto;
+    font-size: 32rpx;
+    color: #fff;
+}
 
-	.tit{
-		padding: 10rpx 0;
-		.close{
-			float: right;
+
+.mt-22 {
+    margin-top: 22rpx;
+}
+
+.bg-color {
+    background-color: #2DB389;
+}
+
+.addbar {
+    background: #fff;
+    text-align: center;
+    margin-bottom: 20rpx;
+    padding: 36rpx 0;
+
+    .iconfont {
+        font-size: 46rpx;
+        margin-right: 20rpx;
+    }
+
+    .sp {
+        vertical-align: middle;
+    }
+}
+
+.swipeAction {
+    // padding: 20rpx 30rpx;
+    font-size: 28rpx;
+
+    .addressLi {
+        .addressLi_l {
+            width: 80rpx;
+            height: 80rpx;
+            display: flex;
+            // justify-content: center;
+            align-items: center;
+
+            .iconfont {
+                color: #666;
+                font-size: 38rpx;
+            }
+
+            .pitchOn {
+                color: #1989fa;
+            }
+        }
+
+        .addressLi_r {
+            width: calc(100% - 80rpx);
+        }
+
+        .addressLi_l,
+        .addressLi_r {
+            float: left;
+        }
+
+        .user {
+            margin-bottom: 10rpx;
+        }
+
+        .name {
+            // font-weight: bold;
+            font-size: 32rpx;
+            margin-right: 10rpx;
+        }
+
+        .address {
+            font-size: 24rpx;
+            color: #999;
+        }
+    }
+
+    .swipeAction_item {
+        background: #fff;
+        margin-bottom: 20rpx;
+    }
+
+    .btns {
+        .btn {
+            float: left;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            height: 100%;
+            padding: 0 30rpx;
+            color: #fff;
+            font-size: 36rpx;
+        }
+
+        .edit {
+            background: rgba(25, 137, 250, 0.5);
+        }
+
+        .del {
+            background: rgba(238, 10, 36, 0.5);
+        }
+		.iconfont{
+			color: #fff;
 		}
+    }
+}
+
+::v-deep .uni-swipe_box {
+    padding: 20rpx 30rpx;
+}
+
+.tit {
+    padding: 20rpx 0;
+	background: #fff;
+	margin-bottom: 20rpx;
+	.cancel{
+		padding: 0 30rpx;
+		color: #333;
 	}
-</style>
+
+    .close {
+        float: right;
+		padding: 0 30rpx;
+		color: #333;
+    }
+}
+.defaultAddress{
+	border: 1rpx solid #2DB389;
+	color: #2DB389;
+	border-radius: 6rpx;
+	font-size: 18rpx;
+	padding: 0 6rpx;
+	margin-left: 20rpx;
+}
+</style>

+ 16 - 2
src/request/request.js

@@ -38,11 +38,25 @@ uni.addInterceptor('request', {
 				icon: "none",
 			});
 		}
+
+		if(args.data.code == 400){
+			uni.removeStorageSync('token');
+			uni.showToast({
+				title: args.data.msg,
+				duration: 2000,
+				icon: "none",
+			});
+			setTimeout(() => {
+				uni.reLaunch({
+				  url: "/pages/my/index"
+				});
+			}, 1500);
+		}
 	},
 	fail(err) {
-		// console.log('interceptor-fail', err)			请求失败
+		// console.log('interceptor-fail', err)			//请求失败
 	},
 	complete(res) {
-		// console.log('interceptor-complete', res)		成功|失败
+		// console.log('interceptor-complete', res)		//成功|失败
 	}
 })