mym 1 年間 前
コミット
2525a97caa

+ 4 - 4
pages/goodsDetails/goodsDetails.vue

@@ -92,10 +92,10 @@
 					goodsName: this.goods.goodsName,
 					// buyNum: parseInt(this.num)
 				}
-
-				console.log(params)
-				this.$api.addCar(this.goods).then(res => {
-					console.log(res)
+				this.$api.addCar(params).then(res => {
+					if(res.code == 200) {
+						this.$common.toast(res.msg)
+					}
 				})
 			}
 		}

+ 4 - 3
pages/index/index.vue

@@ -68,8 +68,8 @@ export default {
 	onLoad() {
 		this.getBannerList();
 		this.getNewsList();
-		this.getRoleMenu();
-		//this.getMenu();
+		// this.getRoleMenu();
+		this.getMenu();
 	},
 	methods: {
 		getBannerList() {
@@ -91,8 +91,9 @@ export default {
 			});
 		},
 		getMenu() {
+			let menu = uni.getStorageSync('menu');
 			this.$api.getMenu().then(res => {
-				this.roleMenu.map((item2, index1) => {
+				menu.map((item2, index1) => {
 					res.data.map((item1, index) => {
 						if (parseInt(item1.id) == parseInt(item2)) {
 							this.menuList.push(item1);

+ 2 - 2
pages/login/chooseRole.vue

@@ -33,8 +33,8 @@
 				}
 				var that = this
 				setTimeout(function() {
-					that.$common.to('/pages/login/register?type='+this.current);
-				}, 1000)
+					that.$common.to('/pages/login/register?type='+that.current);
+				}, 500)
 			},
 			getList(){
 				this.$api.getIdentifyList().then(res => {

+ 2 - 1
pages/login/register.vue

@@ -82,7 +82,7 @@
 						},
 						{
 							validator: (rule, value, callback) => {
-								return uni.$u.test.mobile(value);
+								// return uni.$u.test.mobile(value);
 							},
 							message: '手机号码不正确',
 							trigger: ['change', 'blur'],
@@ -106,6 +106,7 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad(option) {
+			console.log(option.type)
 			this.form.type=option.type
 		},
 		created() {},