2 Commits 5c8b484049 ... cff4c14dee

Autore SHA1 Messaggio Data
  YZM cff4c14dee 修改bug 1 anno fa
  YZM 15fc3a5460 改bug 1 anno fa

+ 3 - 0
manifest.json

@@ -66,6 +66,9 @@
                     }
                 }
             }
+        },
+        "compatible" : {
+            "ignoreVersion" : true
         }
     },
     /* 快应用特有相关 */

+ 1 - 0
pages/baocun/index.vue

@@ -163,6 +163,7 @@ export default {
 						datalist1.push(datalist[i].goods)
 					}
 					uni.setStorageSync("datalist",datalist1)
+					console.log("111")
 					that.huancun();
 					that.getFl();
 					that.getCj();

+ 2 - 2
pages/bianji/index.vue

@@ -181,7 +181,7 @@ export default {
 							that.listcj.push(res.data.data[i].scene_name)
 						}
 						that.listcjall=res.data.data;
-						that.getYxuan(that.listcjall[0].id)
+						that.getYxuan(that.listcjall[that.activeIndexcj].id)
 					}
 				}else{
 					that.listcj=[];
@@ -203,7 +203,7 @@ export default {
 							that.listfl.push(res.data.data[i].category_name)
 						}
 						that.listflall=res.data.data;
-						that.getKxuan(that.listflall[0].id);
+						that.getKxuan(that.listflall[that.activeIndexfl].id);
 					}
 				}else{
 					that.listfl=[];

+ 18 - 0
pages/changan/index.vue

@@ -98,6 +98,23 @@ export default {
 		this.fenleichange();
 	},
 	methods: {
+		chuFun(){
+			var that=this;
+			myRequest({
+				url: "/api/Goods/cancelDelivery",
+				method:'post',
+				data:{qiu_id:that.qiuid,id:that.chukudata[that.current].id}
+			}).then(res => {
+				console.log(res.data)
+				if (res.data.code == 200) {
+					that.show_1=false;
+					that.$refs.toast.show({model:'success',label:res.data.msg})
+				}else{
+					that.$refs.toast.show({model:'error',label:res.data.msg})
+				}
+			})
+			
+		},
 		baocun(){
 			var that=this;
 			var arr=[],a=0;
@@ -162,6 +179,7 @@ export default {
 					that.chukudata=res.data.data;
 					for(let i=0;i<res.data.data.length;i++){
 						that.list1.push(res.data.data[i].image)
+						that.qiu_id=res.data.data[0].qiu_id;
 					}
 					that.$refs.toast.show({model:'success',label:'出库成功'})
 				}else{

+ 1 - 1
pages/chengyuan/index.vue

@@ -139,7 +139,7 @@ export default {
 		obTstr2(o){
 			console.log(o)
 			if(Array.isArray(o)){
-				if(o.length===0) return "";
+				if(o.length==0 || ! o[0]) return "";
 				if(o[0].data){
 					var name=o[0].data.title;
 				}else if(o[0]){

+ 1 - 1
pages/chuanghome/index.vue

@@ -111,7 +111,7 @@ export default {
 				{title:"瘦子",id:51},
 				{title:"模特",id:61},
 			],
-			active:2,
+			active:1,
 			chelianglis:[
 				{title:"标准",id:1},
 				{title:"偏瘦",id:2},

+ 1 - 1
pages/dapei/index.vue

@@ -231,7 +231,7 @@ export default {
 							that.listfl.push(res.data.data[i].category_name)
 						}
 						that.listflall=res.data.data;
-						that.getKxuan(that.listflall[0].id);
+						that.getKxuan(that.listflall[that.activeIndex1].id);
 					}
 				}else{
 					that.listfl=[];

+ 2 - 2
pages/dizhi/index.vue

@@ -1,12 +1,12 @@
 <template>
 	<view :style="{ minHeight: sys.windowHeight + 'px' }" :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
-		<tm-menubars title="消息列表" :shadow="0" :showback="true"></tm-menubars>
+		<tm-menubars title="地址列表" :shadow="0" :showback="true"></tm-menubars>
 		<div class="dizhi">
 			<view class="contdz pt-20" v-for="item in addList" :key="item.id">
 				<view>
 					<text> {{item.name}}</text>
 					<text class="ml-40 text-gray text-size-m">{{item.mobile}}</text>
-					<tm-button class="ml-50" :round="10" theme="gray" size="s">{{item.label}}</tm-button>
+					<tm-button class="ml-50" :round="10" theme="gray" size="s" v-if="item.label">{{item.label}}</tm-button>
 					<tm-button class="ml-10" :round="10" size="s" v-if="item.default_address==1">默认</tm-button>
 				</view>
 				<view class="text-gray text-size-s mt-15">

+ 9 - 7
pages/gouwuche/index.vue

@@ -215,13 +215,15 @@
 			},
 			// 按钮减
 			jian(data) {
-				// console.log(data);
-				// if (data.buy <= 1) {
-				// 	this.$refs.toast.show({
-				// 		model: 'warn',
-				// 		label: '该商品不能减少了哟~'
-				// 	})
-				// }
+				console.log(data);
+				if (data.buy <= 1) {
+					this.$refs.toast.show({
+						model: 'warn',
+						label: '该商品不能减少了哟~'
+					})
+					return
+				}
+				
 				this.number = -1;
 			},
 			// 按钮加

+ 11 - 3
pages/index/index.vue

@@ -10,11 +10,14 @@
 				</template> -->
 			</tm-search>
 			<view class="dingwei">
-				<tm-quickCity color="blue" v-model="offshow"  @change="qiehuandizhi">
+				<!-- <tm-quickCity color="blue" @change="qiehuandizhi">
+					<image style="vertical-align: middle;" src="/static/img/dingwei.png" mode="widthFix"></image>
+					<text style="vertical-align: middle;" class="text-size-g">{{chengshi}}</text>
+				</tm-quickCity> -->
+				<tm-quickCity @change="qiehuandizhi" :value.sync="offshow" :black="true" color="blue" :defaultValue.sync="defaultValue">
 					<image style="vertical-align: middle;" src="/static/img/dingwei.png" mode="widthFix"></image>
 					<text style="vertical-align: middle;" class="text-size-g">{{chengshi}}</text>
 				</tm-quickCity>
-
 			</view>
 		</view>
 		<view class="zhuti mt-50">
@@ -160,7 +163,7 @@
 			return {
 				offshow:false,
 				chengshi:"南京",
-				defaultValue: [],
+				defaultValue:["江西省"],
 				soso: '',
 				aab: false,
 				shoucangsrc: true,
@@ -195,6 +198,11 @@
 					url: "/pages/login/index"
 				})
 			}
+			if (uni.getStorageSync("mobile") == "") {
+				uni.redirectTo({
+					url: "/pages/login/index"
+				})
+			}
 			this.sys = uni.getSystemInfoSync();
 			this.getService();
 			this.getremmend();

+ 6 - 6
pages/shop/index.vue

@@ -3,7 +3,7 @@
 		<tm-menubars title="" :shadow="0" :showback="false"></tm-menubars>
 		<view class="C1b1b1b pb-40">
 			<view class="sousuo">
-				<tm-pickersCity class="dingwei fl" btn-color="bg-gradient-blue-accent" @confirm="okCity"
+				<tm-pickersCity level="city" class="dingwei fl" btn-color="bg-gradient-blue-accent" @confirm="okCity"
 					:default-value="addr">
 					<view>
 						<text class="text-size-n">{{addr[1]}}</text>
@@ -187,11 +187,11 @@
 								console.log(district);
 							},
 							fail: function(res) {
-								uni.showToast({
-									title: '定位失败',
-									duration: 2000,
-									icon: "none"
-								})
+								// uni.showToast({
+								// 	title: '定位失败',
+								// 	duration: 2000,
+								// 	icon: "none"
+								// })
 								console.log(res);
 							},
 							complete: function(res) {

+ 1 - 8
pages/shopsoso/index.vue

@@ -3,13 +3,6 @@
 		<tm-menubars title="" :shadow="0" :showback="false"></tm-menubars>
 		<view class="C1b1b1b pb-10">
 			<view class="sousuo">
-				<tm-pickersCity class="dingwei fl" btn-color="bg-gradient-blue-accent" @confirm="okCity"
-					:default-value="addr">
-					<view>
-						<text class="text-size-n">{{addr[1]}}</text>
-						<tm-icons :size="24" color="white" name="icon-angle-down"></tm-icons>
-					</view>
-				</tm-pickersCity>
 				<view>
 					<tm-search @confirm="sosoFun" class="fl" v-model="soso" color="white" confirm-text=""></tm-search>
 					<text class="quxiao fr" @click="goindex()">取消</text>
@@ -271,7 +264,7 @@
 	}
 
 	/deep/ .tm-search {
-		width: 66%;
+		width: 86%;
 		background-color: #414141 !important;
 		border-radius: 10px;
 	}

+ 55 - 5
pages/shouhuodi/index.vue

@@ -9,7 +9,7 @@
 					<tm-pickersCity @confirm="dateSe_3" :default-value="d_3" btn-color="bg-gradient-deep-purple-accent"
 						style="margin:0 16px 0px;box-sizing: border-box;">
 						<tm-input :disabled="true" style="padding: 0px 60px 0px 0px!important;margin-left: 0!important;" title="所在地区"
-							placeholder="省市区县、乡镇等" v-model="dizhi.region" @click="dateSe_3">
+							placeholder="省市区县、乡镇等" v-model="dizhi.region">
 						</tm-input>
 					</tm-pickersCity>
 					<tm-input title="详细地址" placeholder="街道、楼牌号等" v-model="dizhi.address"></tm-input>
@@ -33,7 +33,14 @@
 					</tm-listitem>
 				</view>
 			</tm-sheet>
-			<tm-button :round="24" class="sao mb-40 mt-40" block @click="redact" v-if="isSave">修改</tm-button>
+			<view class="anniu1" v-if="isSave">
+				<!-- <tm-button :round="24" class="sao mb-40 mt-40" block @click="shanchu">删除</tm-button>
+				<tm-button :round="24" class="sao mb-40 mt-40" block @click="redact">修改</tm-button> -->
+				
+				<tm-button @click="shanchu()" theme="gray" size="n">删除</tm-button>
+				<tm-button @click="redact()" class="fr" theme="primary" size="n">保存</tm-button>
+				
+			</view>
 			<tm-button :round="24" class="sao mb-40 mt-40" block @click="saveAdd" v-else>保存</tm-button>
 		</div>
 		<!-- 弹出层消息 -->
@@ -67,6 +74,7 @@
 					isdefault: 0,
 				},
 				d_3: [],
+				fd:0
 			};
 		},
 		onLoad(op) {
@@ -74,6 +82,7 @@
 				this.isSave = true;
 				this.dizhi.id = op.id;
 			}
+			console.log(this.isSave)
 		},
 		created() {
 			var that = this;
@@ -113,6 +122,41 @@
 					this.dizhi.isdefault = 0;
 				}
 			},
+			//删除地址
+			shanchu(){
+				var that=this;
+				myRequest({
+					url: '/api/Address/delAddressInfo',
+					method: 'get',
+					data: {
+						address_id:that.dizhi.id
+					}
+				}).then(res => {
+					console.log(res.data);
+					that.fd=0;
+					if (res.data.code == 200) {
+						that.$refs.toast.show({
+							model: 'successs',
+							label: res.data.msg
+						})
+						setTimeout(() => {
+							let pages = getCurrentPages(); // 当前页面
+							let beforePage = pages[pages.length - 2]; // 前一个页面
+							uni.navigateBack({
+								delta: 1,
+								success: function() {
+									beforePage.$vm.getAddList()
+								}
+							});
+						}, 800)
+					} else {
+						that.$refs.toast.show({
+							model: 'error',
+							label: res.data.msg
+						})
+					}
+				})
+			},
 			// 保存地址
 			saveAdd() {
 				let that = this;
@@ -139,6 +183,10 @@
 						icon: 'none'
 					})
 				} else {
+					if(that.fd==1){
+						return
+					}
+					that.fd=1;
 					myRequest({
 						url: '/api/Address/addAddress',
 						method: 'post',
@@ -152,6 +200,7 @@
 						}
 					}).then(res => {
 						console.log(res.data);
+						that.fd=0;
 						if (res.data.code == 200) {
 							that.$refs.toast.show({
 								model: 'successs',
@@ -270,9 +319,9 @@
 		border-bottom: solid 1px #303030 !important;
 	}
 
-	/deep/.tm-button .tm-button-btn uni-button.wn[data-v-dae977ca] {
-		padding-left: 0px !important;
-	}
+	// /deep/.tm-button .tm-button-btn uni-button.wn[data-v-dae977ca] {
+	// 	padding-left: 0px !important;
+	// }
 
 	.sao {
 		width: 88%;
@@ -288,4 +337,5 @@
 		border-top: 1px solid #303030;
 		margin-top: 15px;
 	}
+	.anniu1{width: 75%;margin:0 auto;margin-top: 20px;padding: 0 !important;}
 </style>

+ 2 - 0
pages/wardrobe/index.vue

@@ -206,6 +206,8 @@ export default {
 						for(let i=0;i<that.listqiu.length;i++){
 							that.listqiu[i]["icon"]='/static/img/96.png'
 						}
+					}else{
+						that.listqiu=[];
 					}
 				}else{
 					that.listqiu=[];

+ 6 - 6
tm-vuetify/components/tm-cartCellListFood/tm-cartCellListFood.vue

@@ -311,12 +311,12 @@
 			},
 			jian(data) {
 				console.log(data,'2');
-				if(data.buy<=1){
-					uni.showToast({
-						title:'该商品不能减少了哟~',
-						icon:"warning"
-					})
-				}
+				// if(data.buy<=1){
+				// 	uni.showToast({
+				// 		title:'该商品不能减少了哟~',
+				// 		icon:"warning"
+				// 	})
+				// }
 				const buyNum = this.cNum;
 				if (buyNum <= 0) {
 					this.cart_num = 1;

+ 1 - 1
tm-vuetify/components/tm-pickersView/tm-pickersView.vue

@@ -508,7 +508,7 @@
 <style >
 	.tm-pickersView .tm-pickersBView-item-h{
 		height: 50px;
-		background-color: rgba(0,0,0,0.03);
+		background-color: rgba(255,255,255,0.2);
 		width: calc(100% - 10px);
 		margin-left: 5px;
 		border-radius: 20rpx;

+ 4 - 7
tm-vuetify/components/tm-quickCity/tm-quickCity.vue

@@ -140,8 +140,7 @@
 			},
 			hotCity:{
 				type:Array,
-				default:()=>[]
-				// ["江西省","南昌市"],["北京市"],["广东省","广州市"],["浙江省","杭州市"],["重庆市"],["湖南省","长沙市"],["湖北省","武汉市"],["四川省","成都市"]
+				default:()=>[["江西省","南昌市"],["北京市"],["广东省","广州市"],["浙江省","杭州市"],["重庆市"],["湖南省","长沙市"],["湖北省","武汉市"],["四川省","成都市"]]
 			},
 			color:{
 				type:String,
@@ -167,7 +166,7 @@
 		},
 		data() {
 			return {
-				
+				remen:[["江西省","南昌市"],["北京市"],["广东省","广州市"],["浙江省","杭州市"],["重庆市"],["湖南省","长沙市"],["湖北省","武汉市"],["四川省","成都市"]],
 				list:[],
 				active:0,
 				active_2:0,
@@ -264,17 +263,15 @@
 				})
 			},
 			async selectedDefaultHot(index){
-				
-				this.$emit('update:defaultValue',this.hotCity[index]);
+				var a=[["江西省","南昌市"],["北京市"],["广东省","广州市"],["浙江省","杭州市"],["重庆市"],["湖南省","长沙市"],["湖北省","武汉市"],["四川省","成都市"]];
+				this.$emit('update:defaultValue',a[index]);
 				let chl = this.childrenIndx[0];
 				if(chl){
 					this.$set(this.list[chl.index].children[chl.childrenIndex],'checked',false)
 				}
 				this.childrenIndx=[null,null,null];
 				this.$nextTick(async function(){
-					
 					await this.setDefaultValue()
-					
 					this.cityClick_pr(this.list[this.childrenIndx[0]],this.childrenIndx[0])
 				})
 			},