YZM 1 anno fa
parent
commit
df80cdb9fd

+ 1 - 1
api/request.js

@@ -23,7 +23,7 @@ export const myRequest = (options) => {
 			url: obj_url,
 			method: obj_method,
 			header: {
-				'token':uni.getStorageSync("token")
+				'token':uni.getStorageSync("token"),
 			},
 			data: obj_data,
 			success: (res) => {

+ 4 - 22
manifest.json

@@ -17,9 +17,7 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {
-            "Push" : {}
-        },
+        "modules" : {},
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
@@ -27,23 +25,12 @@
                 "permissions" : [
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ]
             },
             /* ios打包配置 */
@@ -53,18 +40,13 @@
             /* SDK配置 */
             "sdkConfigs" : {
                 "ad" : {},
-                "push" : {
-                    "unipush" : {
-                        "version" : "2",
-                        "offline" : false
-                    }
-                },
                 "maps" : {
                     "amap" : {
                         "appkey_ios" : "",
                         "appkey_android" : ""
                     }
-                }
+                },
+                "share" : {}
             }
         },
         "compatible" : {

+ 10 - 10
pages/dapei/index.vue

@@ -10,12 +10,12 @@
 			<view class="scroll-view-item_H" v-if="alltouList.length !=0">
 				<image v-if="alltouList[0].data !=0" class="chuanda" :src="alltouList[0].data.makeAppointmentCollocation.image"></image>
 				<view v-else class="chuanda">
-					<view class="text-white text-size-lg">{{tianqiList.city}}市</view>
-					<view class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.temp}}°C</view>
-					<view class="text-white text-size-lg mt-15">{{tianqiList.weather}}</view>
-					<view class="text-gray text-size-lg mt-10">最低{{tianqiList.templow}}°c 最高{{tianqiList.temphigh}}°c</view>
+					<view v-if="tianqiList" class="text-white text-size-lg">{{tianqiList.city}}市</view>
+					<view v-if="tianqiList" class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.temp}}°C</view>
+					<view v-if="tianqiList" class="text-white text-size-lg mt-15">{{tianqiList.weather}}</view>
+					<view v-if="tianqiList" class="text-gray text-size-lg mt-10">最低{{tianqiList.templow}}°c 最高{{tianqiList.temphigh}}°c</view>
 				</view>
-				<view class="mt-20 text-align-center">
+				<view class="mt-20 text-align-center" v-if="tianqiList">
 					<image class="taiyang" src="/static/img/106.png" mode="widthFix"></image>
 					<text class="text-size-s ml-15">{{tianqiList.templow}}°c~{{tianqiList.temphigh}}°c</text>
 					<text class="text-size-s ml-15">{{tianqiList.week}}</text>
@@ -25,12 +25,12 @@
 			<view class="scroll-view-item_H" v-if="alltouList.length !=0">
 				<image v-if="alltouList[1].data !=0" class="chuanda" :src="alltouList[1].data.makeAppointmentCollocation.image"></image>
 				<view v-else class="chuanda">
-					<view class="text-white text-size-lg">{{tianqiList.city}}市</view>
-					<view class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.daily[1].day.temphigh}}°C</view>
-					<view class="text-white text-size-lg mt-15">{{tianqiList.daily[1].day.weather}}</view>
-					<view class="text-gray text-size-lg mt-10">{{tianqiList.daily[1].day.winddirect}} {{tianqiList.daily[1].day.windpower}}°c</view>
+					<view v-if="tianqiList" class="text-white text-size-lg">{{tianqiList.city}}市</view>
+					<view v-if="tianqiList" class="text-size-lg mt-15 text-weight-b" style="color: #FFCC00;">{{tianqiList.daily[1].day.temphigh}}°C</view>
+					<view v-if="tianqiList" class="text-white text-size-lg mt-15">{{tianqiList.daily[1].day.weather}}</view>
+					<view v-if="tianqiList" class="text-gray text-size-lg mt-10">{{tianqiList.daily[1].day.winddirect}} {{tianqiList.daily[1].day.windpower}}°c</view>
 				</view>
-				<view class="mt-20 text-align-center">
+				<view class="mt-20 text-align-center" v-if="tianqiList">
 					<image class="taiyang" src="/static/img/106.png" mode="widthFix"></image>
 					<text class="text-size-s ml-15">最高温度{{tianqiList.daily[1].day.temphigh}}°C</text>
 					<text class="text-size-s ml-15">{{tianqiList.daily[1].week}}</text>

+ 5 - 5
pages/index/index.vue

@@ -244,11 +244,11 @@
 								console.log(city);
 							},
 							fail: function(res) {
-								// uni.showToast({
-								// 	title: '定位失败',
-								// 	duration: 2000,
-								// 	icon: "none"
-								// })
+								uni.showToast({
+									title: '定位失败',
+									duration: 2000,
+									icon: "none"
+								})
 							},
 							complete: function(res) {
 								console.log(res);

+ 13 - 4
pages/luru/index.vue

@@ -83,11 +83,13 @@ export default {
 			active:1,
 			role_arr:[],
 			fenlei:[],
-			alldata:{}
+			alldata:{},
+			lable_code:''
 		};
 	},
-	onLoad() {
-		
+	onLoad(e) {
+		console.log(e)
+		this.lable_code=e.lable_code;
 	},
 	created() {
 		this.sys = uni.getSystemInfoSync();
@@ -315,9 +317,16 @@ export default {
 				data:{
 					img:img,
 					id:that.alldata.id,
-					parm:that.arrbig
+					parm:that.arrbig,
+					lable_code:that.lable_code
 				}
 			}).then(res => {
+				console.log({
+					img:img,
+					id:that.alldata.id,
+					parm:that.arrbig,
+					lable_code:that.lable_code
+				})
 				if (res.data.code == 200) {
 					that.active=3;
 				}else{

+ 2 - 2
pages/user/index.vue

@@ -6,7 +6,7 @@
 			<view class="info">
 				<image class="chuandaimg fl" src="/static/img/55.png" mode="widthFix"></image>
 				<view class="chuandazi fl ml-30">
-					<view class="text-size-lg text-weight-b text-overflow-2 mt-20">普通用户</view>
+					<view class="text-size-lg text-weight-b text-overflow-2 mt-20">欢迎用户</view>
 					<view class="tm-cartCellListFood-label text-size-s text-grey">{{mobile}}</view>
 					<tm-button size="s" class="mt-10">编辑个人资料</tm-button>
 				</view>
@@ -73,7 +73,7 @@ export default {
 			// {title:'系统通知',type:'6'},
 			// {title:'历史记录',type:'7'},
 			{title:'创建家庭',type:'8'},
-			{title:'内容推送',type:'9'},
+			// {title:'内容推送',type:'9'},
 			]
 		};
 	},

+ 37 - 4
pages/wardrobe/index.vue

@@ -124,6 +124,7 @@
 			</view>
 		</tm-poup>
 		<!-- 弹出层消息 -->
+		<tm-dialog @confirm="querentm" :inputVala="inputVala" confirmText="确定" :showCancel="false" model="confirm" v-model="show3" content="请确认条码内容是否正确" theme="split"></tm-dialog>
 		<tm-message ref="toast"></tm-message>
 	</view>
 </template>	
@@ -155,7 +156,9 @@ export default {
 			current:0,
 			qiuid:'',
 			quanbuchang:[],
-			countdown:''
+			countdown:'',
+			show3:false,
+			inputVala:''
 		};
 	},
 	onLoad(e) {
@@ -174,7 +177,21 @@ export default {
 		this.getfenltext();
 	},
 	created() {
-		
+		var that=this;
+		// 定时器轮询看看衣柜有没有变化
+		setInterval(function(){
+			myRequest({
+				url: "/api/Goods/clothStatus",
+				method:'post',
+				data:{}
+			}).then(res => {
+				if(res.data.data!=0){
+					that.getQiu()
+					that.fenleichange();
+					that.getfenltext();
+				}
+			})
+		},2000)
 	},
 	methods: {
 		formatSeconds(value) {
@@ -412,9 +429,25 @@ export default {
 			this.page=this.page+1;
 			this.getList();
 		},
-		luru(){
+		querentm(e){
 			uni.navigateTo({
-				url: "/pages/luru/index",
+				url: "/pages/luru/index?lable_code="+e,
+			})
+		},
+		luru(){
+			// 先调用扫码功能
+			var that=this;
+			uni.scanCode({
+				scanType: ['barCode'],
+				success: function (res) {
+					console.log('条码类型:' + res.scanType);
+					console.log('条码内容:' + res.result);
+					that.inputVala=res.result;
+					that.show3=true;
+				},
+				error : function(e) {
+					alert("网络异常,请重试");
+				}
 			})
 		}
 	},

+ 1 - 1
pages/yifu/index.vue

@@ -391,7 +391,7 @@ export default {
 					that.qiu_id=res.data.data.qiu_id;
 					that.list1.push(res.data.data.goodInfo[0].image)
 					// 倒计时开始
-					var countdownstart=Date.parse(new Date(res.data.data[0].stock_time))/1000;
+					var countdownstart=Date.parse(new Date(res.data.data.stock_time))/1000;
 					var countdownend=countdownstart+2*60*60;
 					var countdownnow=Date.parse(new Date())/1000
 					var daojishi=countdownend-countdownnow;