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