Selaa lähdekoodia

登录页样式、首页消息隐藏

baijunde 1 vuosi sitten
vanhempi
commit
1e847a5c07
6 muutettua tiedostoa jossa 52 lisäystä ja 62 poistoa
  1. 2 2
      manifest.json
  2. 2 2
      pages/index/index.vue
  3. 6 5
      pages/login/login.vue
  4. 7 1
      pages/product/creatStandard.vue
  5. 35 52
      pages/scan/record.vue
  6. BIN
      static/desktop.png

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "掌柜生活商户版",
     "appid" : "__UNI__E0EA6E1",
     "description" : "",
-    "versionName" : "1.0.4",
-    "versionCode" : 104,
+    "versionName" : "1.0.5",
+    "versionCode" : 105,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 2 - 2
pages/index/index.vue

@@ -42,7 +42,7 @@
 				<indexNav />
 			</view>
 		</view>
-		<view class="message">
+		<!-- <view class="message">
 			<view class="title">
 				实时消息
 			</view>
@@ -68,7 +68,7 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 	</view>
 </template>
 

+ 6 - 5
pages/login/login.vue

@@ -31,7 +31,11 @@
 						:class="[shape == 'round' ? 'round' : '']" @tap="onLogin"><text space="emsp">{{ loading ? "登录中..." : " 登录"}}</text>
 					</button>
 				</view>
-				<view class="flex align-center" style="margin-top:10px;color: #858585;font-size:11px">
+				<view class="foote" style="display: flex;align-items: center;margin-top: 40rpx;justify-content: center;">
+					<view class="text-color" @tap="nav('register')" style="margin-right: 53rpx;">去注册</view>
+					<text style="" @tap="nav('resetpassword')">忘记密码</text>
+				</view>
+				<view class="flex align-center" style="margin-top:154rpx;color: #858585;font-size:26rpx;justify-content: center;">
 					<uni-data-checkbox multiple :localdata="sex" v-model="checked" active-color="#FF852D "
 						style="margin-top: 2px;transform: scale(0.7,0.7	);"></uni-data-checkbox>
 					请您阅读并同意<view> <text @tap="nav('xieyi')" class="text-color"> 用户协议</text> 和 <text class="text-color"
@@ -49,10 +53,7 @@
 			<!-- #endif -->
 
 		</view>
-		<view class="footer">
-			<view class="text-color" @tap="nav('register')">去注册</view>
-			<text style="margin-top: 5px;" @tap="nav('resetpassword')">忘记密码</text>
-		</view>
+		
 
 		<!-- </scroll-view> -->
 

+ 7 - 1
pages/product/creatStandard.vue

@@ -107,7 +107,12 @@
 								this.$tip.success(res.data.message || '添加成功');
 								this.back()
 							} else {
-								this.$tip.error(res.data.message);
+								uni.showToast({
+									icon:'error',
+									title:'不能重复添加'
+								})
+								// this.$tip.error(res.data.message);
+								
 							}
 						})
 				} else {
@@ -153,6 +158,7 @@
 
 		},
 		onShow() {
+			
 			let that = this
 			uni.getStorage({
 				key: 'login_user_info',

+ 35 - 52
pages/scan/record.vue

@@ -144,21 +144,29 @@
         });
       },
       getList(page) {
-        let data = {
-          merchantId: this.merchantId,
-          productName: this.productName,
-          pageNo: page.num,
-          pageSize: page.size,
-          writeOffTimeEnd: this.writeOffTimeEnd,
-          writeOffTimeStart: this.writeOffTimeStart
-        }
-        this.$http.post("/app/writeOff/list", data).then(res => {
-          if (res.data.code == 200) {
-            console.log(res)
-            this.list = this.list.concat(res.data.result.records)
-            this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
-          }
-        })
+				
+					let data = {
+					  merchantId: uni.getStorageSync('login_user_info').merchantId,
+					  productName: this.productName,
+					  pageNo: page.num,
+					  pageSize: page.size,
+					  writeOffTimeEnd: this.writeOffTimeEnd,
+					  writeOffTimeStart: this.writeOffTimeStart
+					}
+					console.log(data.merchantId)
+						this.$http.post("/app/writeOff/list", data).then(res => {
+						  if (res.data.code == 200 && res.data.result.records.length>0) {
+						    this.list = this.list.concat(res.data.result.records)
+						    this.mescroll.endSuccess(res.data.result.records.length, res.data.result.total);
+						  }else{
+									this.mescroll.endErr()
+							}
+						})
+						.catch(()=>{
+							this.mescroll.endErr()
+						})
+       
+        
       },
       searchList() {
         this.list = []
@@ -187,24 +195,13 @@
          this.getList(page);
       },
       getMonthRange(monthValue) {
-				let year = new Date().getFullYear()
-        const startDate = new Date(year, monthValue - 1, 1);
-        const endDate = new Date(year, monthValue, 0);
-        endDate.setHours(23, 59, 59, 999);
-        const localStart = startDate.toLocaleString();
-        const localEnd = endDate.toLocaleString();
-        this.writeOffTimeStart = localStart
-        this.writeOffTimeEnd = localEnd
-       setTimeout(()=>{
-				 uni.showToast({
-				 	icon:'none',
-				 	title:this.writeOffTimeStart+'---'+this.writeOffTimeEnd
-				 })
-			 })
-        // return {
-        //   start: startDate, // 当月第一天 00:00:00
-        //   end: endDate // 当月最后一天 23:59:59.999
-        // };
+		let year = new Date().getFullYear();
+		const startDate = new Date(year, monthValue - 1, 1);
+		const endDate = new Date(year, monthValue, 0);
+		endDate.setHours(23, 59, 59, 999);
+		
+		this.writeOffTimeStart = `${year}-${String(monthValue).padStart(2, '0')}-01 00:00:00`;
+		this.writeOffTimeEnd = `${year}-${String(monthValue).padStart(2, '0')}-${String(endDate.getDate()).padStart(2, '0')} 23:59:59`;
       }
     },
     mounted() {
@@ -215,25 +212,11 @@
     onShow() {
 
       let that = this
-      uni.getStorage({
-        key: 'login_user_info',
-        success: function(res) {
-          that.merchantId = res.data.merchantId
-					const date = new Date();
-					// that.month = date.getMonth() + 1;
-					// that.showMonth = date.toLocaleString("zh-CN", {
-					//   month: "long",
-					// });
-					 let currentMonth = new Date().getMonth();
-					that.showMonth = that.timelist[currentMonth].label;
-					console.log(that.showMonth)
-					uni.showToast({
-						icon:'none',
-						title:that.showMonth
-					})
-					that.getMonthRange(that.timelist[currentMonth].value)
-        }
-      })
+			const date = new Date();
+			 let currentMonth = new Date().getMonth();
+			that.showMonth = that.timelist[currentMonth].label;
+			console.log(that.showMonth)
+			that.getMonthRange(that.timelist[currentMonth].value)
       
 
     }

BIN
static/desktop.png