bug
This commit is contained in:
parent
53627e2f41
commit
b1dedd5764
@ -8,7 +8,7 @@ ENV = 'production'
|
|||||||
VUE_APP_BASE_API = '/fuint-application/'
|
VUE_APP_BASE_API = '/fuint-application/'
|
||||||
|
|
||||||
# 发布目录
|
# 发布目录
|
||||||
VUE_APP_PUBLIC_PATH = '/fuintAdmin/'
|
VUE_APP_PUBLIC_PATH = '/oilZt/'
|
||||||
|
|
||||||
# 后端接口地址
|
# 后端接口地址
|
||||||
VUE_APP_SERVER_URL = 'https://www.tuofeng.cc/oilAdmin/'
|
VUE_APP_SERVER_URL = 'https://www.tuofeng.cc/oilAdmin/'
|
||||||
|
@ -49,6 +49,7 @@ Vue.prototype.download = download
|
|||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||||
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||||
|
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
Vue.component('DictTag', DictTag)
|
Vue.component('DictTag', DictTag)
|
||||||
|
@ -254,7 +254,8 @@ export default {
|
|||||||
code:this.loginForm.telcode
|
code:this.loginForm.telcode
|
||||||
}
|
}
|
||||||
this.$store.dispatch("codeLogin", data).then(() => {
|
this.$store.dispatch("codeLogin", data).then(() => {
|
||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
|
this.$router.push({ path: "/Service/index" }).catch(()=>{});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
@ -279,7 +280,8 @@ export default {
|
|||||||
Cookies.remove('rememberMe');
|
Cookies.remove('rememberMe');
|
||||||
}
|
}
|
||||||
app.$store.dispatch("Login", this.loginForm).then(() => {
|
app.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
// app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
|
app.$router.push({ path: "/Service/index" }).catch(()=>{});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
app.loading = false;
|
app.loading = false;
|
||||||
if (app.captchaOnOff) {
|
if (app.captchaOnOff) {
|
||||||
|
@ -39,7 +39,7 @@ system.name = \u84DD\u9CB8\u667A\u6167\u6CB9\u7AD9\u7CFB\u7EDF
|
|||||||
website.url=https://www.fuint.cn/h5/
|
website.url=https://www.fuint.cn/h5/
|
||||||
|
|
||||||
# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740
|
# \u4E0A\u4F20\u56FE\u7247\u672C\u5730\u5730\u5740
|
||||||
images.root=d:/rouyi/uploadPath
|
images.root=d:/ruoyi/uploadPath
|
||||||
images.path=/static/uploadImages/
|
images.path=/static/uploadImages/
|
||||||
|
|
||||||
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
|
# \u4E0A\u4F20\u56FE\u7247\u670D\u52A1\u5668\u57DF\u540D
|
||||||
@ -124,3 +124,7 @@ weixin.subMessage.pointChange=[{'key':'amount', 'name':'\u53D8\u52A8\u6570\u91CF
|
|||||||
rocketmq.name-server=127.0.0.1:9876
|
rocketmq.name-server=127.0.0.1:9876
|
||||||
//2
|
//2
|
||||||
rocketmq.producer.group=provider
|
rocketmq.producer.group=provider
|
||||||
|
|
||||||
|
# \u5458\u5DE5\u7801\u80CC\u666F\u56FE\u8BBE\u7F6E
|
||||||
|
staff.bg=/static/qrCodeImg/laigeyouhui_bg.jpg
|
||||||
|
staff.logo=/static/qrCodeImg/logo.png
|
@ -124,3 +124,7 @@ weixin.subMessage.pointChange=[{'key':'amount', 'name':'\u53D8\u52A8\u6570\u91CF
|
|||||||
rocketmq.name-server=127.0.0.1:9876
|
rocketmq.name-server=127.0.0.1:9876
|
||||||
//2
|
//2
|
||||||
rocketmq.producer.group=provider
|
rocketmq.producer.group=provider
|
||||||
|
|
||||||
|
# \u5458\u5DE5\u7801\u80CC\u666F\u56FE\u8BBE\u7F6E
|
||||||
|
staff.bg=/static/qrCodeImg/laigeyouhui_bg.jpg
|
||||||
|
staff.logo=/static/qrCodeImg/logo.png
|
@ -22,6 +22,7 @@ import com.fuint.utils.Digests;
|
|||||||
import com.fuint.utils.Encodes;
|
import com.fuint.utils.Encodes;
|
||||||
import jdk.nashorn.internal.parser.Token;
|
import jdk.nashorn.internal.parser.Token;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.mock.web.MockMultipartFile;
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@ -229,18 +230,23 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
private SettingService settingService;
|
private SettingService settingService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BackendFileController backendFileController;
|
private BackendFileController backendFileController;
|
||||||
|
@Autowired
|
||||||
|
private Environment env;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception {
|
public String createStaffQrCode(int id, HttpServletRequest request) throws Exception {
|
||||||
|
;;
|
||||||
// 根据id查询员工信息和店铺信息
|
// 根据id查询员工信息和店铺信息
|
||||||
LJStaff staff = this.selectStaffById(id);
|
LJStaff staff = this.selectStaffById(id);
|
||||||
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
|
LJStore store = storeService.selectStoreByStoreId(staff.getStoreId());
|
||||||
//在图片上生成二维码
|
//在图片上生成二维码
|
||||||
String backgroundImage = "D:/ruoyi/qrCode/cailibao_bg.jpg";
|
// String backgroundImage = "/static/qrCodeImg/laigeyouhui_bg.jpg";
|
||||||
String logoImage = "D:/ruoyi/qrCode/logo.png";
|
// String logoImage = "/static/qrCodeImg/logo.png";
|
||||||
|
String backgroundImage = env.getProperty("staff.bg");
|
||||||
|
String logoImage = env.getProperty("staff.logo");
|
||||||
String url = staff.getStaffCode();
|
String url = staff.getStaffCode();
|
||||||
String area = store.getName();
|
String area = store.getName();
|
||||||
String finalPath="D:/ruoyi/qrCode/" + area + ".jpg";
|
String finalPath="D:/qrCode/" + area + ".jpg";
|
||||||
//背景图片路径 loge图片 二维码 输出地址
|
//背景图片路径 loge图片 二维码 输出地址
|
||||||
createLogoCodePicture(backgroundImage, logoImage, url, finalPath, area,store.getAddress());
|
createLogoCodePicture(backgroundImage, logoImage, url, finalPath, area,store.getAddress());
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.member.utils;
|
package com.fuint.business.member.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.io.resource.ClassPathResource;
|
||||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
import cn.hutool.extra.qrcode.QrConfig;
|
import cn.hutool.extra.qrcode.QrConfig;
|
||||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||||
@ -27,7 +28,10 @@ public class QrCodeUtils {
|
|||||||
try {
|
try {
|
||||||
// 读取原图片信息
|
// 读取原图片信息
|
||||||
//得到文件
|
//得到文件
|
||||||
File file = ResourceUtils.getFile(roundImage);
|
// File file = ResourceUtils.getFile(roundImage);
|
||||||
|
ClassPathResource resource = new ClassPathResource(roundImage);
|
||||||
|
ClassPathResource logoResource = new ClassPathResource(logoImage);
|
||||||
|
File file = resource.getFile();
|
||||||
//文件转化为图片
|
//文件转化为图片
|
||||||
Image srcImg = ImageIO.read(file);
|
Image srcImg = ImageIO.read(file);
|
||||||
//获取图片的宽
|
//获取图片的宽
|
||||||
@ -39,7 +43,7 @@ public class QrCodeUtils {
|
|||||||
Graphics2D g = bufImg.createGraphics();
|
Graphics2D g = bufImg.createGraphics();
|
||||||
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
|
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
|
||||||
//使用工具类生成二维码
|
//使用工具类生成二维码
|
||||||
Image image = createQrCode(logoImage, url, 360, 360);
|
Image image = createQrCode(logoResource.getFile().toString(), url, 360, 360);
|
||||||
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。
|
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。
|
||||||
g.drawImage(image, 260, 320, null);
|
g.drawImage(image, 260, 320, null);
|
||||||
// 设置字体,样式,字体大小
|
// 设置字体,样式,字体大小
|
||||||
|
@ -96,7 +96,7 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
|||||||
qrCode.setChainStoreId(store.getChainStoreId());
|
qrCode.setChainStoreId(store.getChainStoreId());
|
||||||
|
|
||||||
// 带有店铺id 跳转首页
|
// 带有店铺id 跳转首页
|
||||||
qrCode.setCollection("https://www.tuofeng.cc/oilIndex?storeId="+store.getId());
|
qrCode.setCollection("https://www.tuofeng.cc/oilStation?storeId="+store.getId());
|
||||||
// 带有店铺id 跳转一键加油页面
|
// 带有店铺id 跳转一键加油页面
|
||||||
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getId());
|
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getId());
|
||||||
row = baseMapper.insert(qrCode);
|
row = baseMapper.insert(qrCode);
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in New Issue
Block a user