Parcourir la source

小程序修改样式

wrh il y a 2 ans
Parent
commit
39dcb3b345

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/login/login.js

@@ -94,7 +94,7 @@ Page({
 							wx.setStorageSync('imgUrl', res.data.imgUrl)
 							wx.setStorageSync('nickName', res.data.nickName)
 							wx.setStorageSync('hlToken', res.data.hlToken)
-							wx.setStorageSync('userid', res.data.userid)
+							wx.setStorageSync('userid', res.data.userId)
 							// 返回上一页携带登录标志
 							let pages = getCurrentPages();
 							let prevPage = pages[pages.length - 2];

+ 6 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pagesPublic/pages/menu/menu.js

@@ -73,7 +73,6 @@ Page({
 			'foodId': obj.id,
 			'canteenId': this.data.canteenId
 		}
-		wx.setStorageSync('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuaWNrTmFtZSI6Inp3cSIsImlkIjoiMSIsImV4cCI6NjE2NjczNTIyODB9.Q-66k-RipE4Lo2IFOov_YbQcD5CIzkH1O0FW9gYn8Jk')
 		like(params).then(res => {
 			if (res.data.result) {
 				switch (this.data.selectTimeNode) {
@@ -166,6 +165,12 @@ Page({
 							icon: 'none',
 							duration: 2000
 						})
+					} else {
+						wx.showToast({
+							title: '发布失败',
+							icon: 'none',
+							duration: 2000
+						})
 					}
 				},
 				fail: (res) => {