Unverified Commit 2f3ef296 authored by 端午安康's avatar 端午安康 Committed by GitHub
Browse files

Merge pull request #1 from linlinjava/master

update
parents a2f77152 83711ec2
......@@ -55,7 +55,7 @@ public class WxFeedbackController {
if (StringUtils.isEmpty(mobile)) {
return ResponseUtil.badArgument();
}
if (!RegexUtil.isMobileExact(mobile)) {
if (!RegexUtil.isMobileSimple(mobile)) {
return ResponseUtil.badArgument();
}
return null;
......
package org.linlinjava.litemall.wx.web;
import com.github.pagehelper.PageInfo;
import com.mysql.jdbc.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.core.system.SystemConfig;
......@@ -12,6 +11,7 @@ import org.linlinjava.litemall.db.domain.*;
import org.linlinjava.litemall.db.service.*;
import org.linlinjava.litemall.wx.annotation.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -259,7 +259,7 @@ public class WxGoodsController {
@Order @RequestParam(defaultValue = "desc") String order) {
//添加到搜索历史
if (userId != null && !StringUtils.isNullOrEmpty(keyword)) {
if (userId != null && !StringUtils.isEmpty(keyword)) {
LitemallSearchHistory searchHistoryVo = new LitemallSearchHistory();
searchHistoryVo.setKeyword(keyword);
searchHistoryVo.setUserId(userId);
......
......@@ -3,6 +3,7 @@ package org.linlinjava.litemall.wx.web;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -19,7 +20,7 @@ public class WxIndexController {
*
* @return 测试数据
*/
@RequestMapping("/index")
@GetMapping("/index")
public Object index() {
return ResponseUtil.ok("hello world, this is wx service");
}
......
......@@ -28,7 +28,7 @@ public class WxIssueController {
/**
* 帮助中心
*/
@RequestMapping("/list")
@GetMapping("/list")
public Object list(String question,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer size,
......
......@@ -42,15 +42,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
wx.request({
url: api.AuthRegisterCaptcha,
data: {
......@@ -145,15 +136,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
wx.login({
success: function(res) {
if (!res.code) {
......
......@@ -70,15 +70,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
wx.showModal({
title: '错误信息',
content: '手机号输入不正确',
showCancel: false
});
return false;
}
if (this.data.password.length < 3) {
wx.showModal({
title: '错误信息',
......
......@@ -177,7 +177,7 @@
</view>
</view>
<view class="good-grid" wx:for="{{floorGoods}}" wx:key="id">
<view class="h">
<view class="h" wx:if="{{item.goodsList.length>0}}">
<text>{{item.name}}</text>
</view>
<view class="b">
......@@ -191,7 +191,7 @@
</view>
</block>
</view>
<navigator url="/pages/category/category?id={{item.id}}" class="t">
<navigator url="/pages/category/category?id={{item.id}}" class="t" wx:if="{{item.goodsList.length>0}}">
<view class="txt">{{'更多'+item.name+'好物 >'}}</view>
</navigator>
</view>
......
......@@ -322,11 +322,6 @@ Page({
return false;
}
if (!check.isValidPhone(address.tel)) {
util.showErrorToast('手机号不正确');
return false;
}
let that = this;
util.request(api.AddressSave, {
id: address.id,
......
......@@ -26,6 +26,7 @@ page {
margin-bottom: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
line-height: 80rpx;
}
.item {
......
......@@ -117,14 +117,6 @@ Page({
return false;
}
if (!check.isValidPhone(this.data.mobile)) {
this.setData({
mobile: ''
});
util.showErrorToast('请输入手机号码');
return false;
}
wx.showLoading({
title: '提交中...',
mask: true,
......
......@@ -86,7 +86,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version>
<version>8.0.16</version>
</dependency>
<dependency>
......
......@@ -322,11 +322,6 @@ Page({
return false;
}
if (!check.isValidPhone(address.tel)) {
util.showErrorToast('手机号不正确');
return false;
}
let that = this;
util.request(api.AddressSave, {
id: address.id,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment