jiangping
2024-07-25 541139912b7583007bfd2120e6a12a337af48d07
提交
已修改8个文件
109 ■■■■■ 文件已修改
admin/.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/package-lock.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaShopWindow.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/userinfo/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.development
@@ -1,3 +1,3 @@
# 开发环境配置
NODE_ENV = 'development'
VUE_APP_BASE_API = 'http://localhost:10028'
VUE_APP_BASE_API = 'http://192.168.0.135:10028'
admin/package-lock.json
@@ -13900,6 +13900,11 @@
        "clipboard": "^2.0.4"
      }
    },
    "vue-jsonp": {
      "version": "2.0.0",
      "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
      "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
    },
    "vue-loader": {
      "version": "15.9.7",
      "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-15.9.7.tgz",
admin/package.json
@@ -25,6 +25,7 @@
    "vue": "^2.6.11",
    "vue-clipboard2": "^0.3.1",
    "vue-json-viewer": "^2.2.22",
    "vue-jsonp": "^2.0.0",
    "vue-router": "^3.5.1",
    "vuescroll": "^4.17.3",
    "vuex": "^3.4.0",
admin/public/index.html
@@ -5,7 +5,7 @@
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>faviconzb.ico">
      <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>
      <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&libraries=service&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>
<!--      <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>
      <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>
      <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>-->
admin/src/components/business/OperaShopWindow.vue
@@ -63,6 +63,8 @@
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { jsonp } from 'vue-jsonp'
export default {
  name: 'OperaShopWindow',
  extends: BaseOpera,
@@ -71,8 +73,8 @@
    return {
      geocoder: null,
      map: [],
      searchValue:'',
      marker:null,
      searchValue: '',
      marker: null,
      // 表单数据
      provinces: [],
      cities: [],
@@ -108,9 +110,22 @@
    })
  },
  methods: {
    searchAddress( ){
      if(this.geocoder && this.searchValue){
        this.geocoder.getLocation(this.searchValue)
    searchAddress () {
      if (  this.searchValue) {
       var that = this
        jsonp('https://apis.map.qq.com/ws/geocoder/v1/', {
          address: this.searchValue,
          key: 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ',
          output: 'jsonp'
        }).then(result => {
          console.log(result)
          if(result.result.location){
            that.changePostion(result.result.location.lng, result.result.location.lat)
          }
        }).catch(error => {
          // 请求失败处理
          console.log(error)
        })
      }
    },
    initMap (lat, long) {
@@ -120,20 +135,20 @@
        center: center,
        zoom: 17
      })
      this.changePostion(long,lat)
      this.changePostion(long, lat)
      qq.maps.event.addListener(this.map, 'click',
        function (event) {
          that.changePostion(event.latLng.lng, event.latLng.lat)
        }
      )
      this.geocoder = new qq.maps.Geocoder()
     /* this.geocoder = new qq.maps.Geocoder()
      this.geocoder.setComplete(function (result) {
        that.changePostion(result.detail.location.lng,result.detail.location.lat)
        that.changePostion(result.detail.location.lng, result.detail.location.lat)
      })
      // 若服务请求失败,则运行以下函数
      this.geocoder.setError(function () {
        console.log('逆解析失败')
      })
      this.geocoder.setError(function (e) {
        console.log(that.searchValue + '=====逆解析失败')
      })*/
    },
    open (title, target) {
      this.title = title
@@ -157,7 +172,7 @@
        const mapContainer = this.$refs.mapContainer // 获取地图容器
        if (mapContainer) {
          // 初始化地图之前检查容器是否存在
          this.initMap(this.form.latitude,this.form.longitude)
          this.initMap(this.form.latitude, this.form.longitude)
          // 初始化腾讯地图
        }
      })
@@ -167,12 +182,12 @@
        .then(res => {
          this.provinces = res
        })
      if(this.form.provinceCode){
        this.selectProvince(this.form.provinceCode,true)
      if (this.form.provinceCode) {
        this.selectProvince(this.form.provinceCode, true)
      }
    },
    // 选择省份
    selectProvince (val,isInit) {
    selectProvince (val, isInit) {
      this.provinces.forEach(item => {
        if (item.id == val) {
          this.form.provinceName = item.name
@@ -180,36 +195,36 @@
      })
      this.cities = []
      this.areas = []
      if(!isInit){
      if (!isInit) {
        this.form.cityName = ''
        this.form.areaCode = ''
        this.form.cityCode = ''
        this.form.areaName = ''
      }
      if(!val || val ==''){
      if (!val || val == '') {
        return
      }
      this.api.areaList({ pid: val })
        .then(res => {
          this.cities = res
          if(isInit){
            this.selectCity(this.form.cityCode,isInit)
          if (isInit) {
            this.selectCity(this.form.cityCode, isInit)
          }
        })
    },
    // 选择城市
    selectCity (val,isInit) {
    selectCity (val, isInit) {
      this.cities.forEach(item => {
        if (item.id == val) {
          this.form.cityName = item.name
        }
      })
      this.areas = []
      if(!isInit){
      if (!isInit) {
        this.form.areaCode = ''
        this.form.areaName = ''
      }
      if(!val || val ==''){
      if (!val || val == '') {
        return
      }
      this.api.areaList({ pid: val })
@@ -224,24 +239,24 @@
        }
      })
    },
    changeMapCenter(){
       this.searchValue = (this.form.provinceName||'')+(this.form.cityName||'')+(this.form.areaName||'')+(this.form.address||'')
    changeMapCenter () {
      this.searchValue = (this.form.provinceName || '') + (this.form.cityName || '') + (this.form.areaName || '') + (this.form.address || '')
      this.searchAddress()
    },
    changePostion (lng, lat) {
      if (lng || lat) {
        this.form.longitude = lng
        this.form.latitude = lat
        if(this.map){
          if(this.marker){
        if (this.map) {
          if (this.marker) {
            this.marker.setMap(null)
          }
          var pos =new qq.maps.LatLng(lat,lng);
          var pos = new qq.maps.LatLng(lat, lng)
          this.map.setCenter(pos)
          this.marker= new qq.maps.Marker({
          this.marker = new qq.maps.Marker({
            position: pos,
            animation:qq.maps.MarkerAnimation.DROP,
            map:this.map
            animation: qq.maps.MarkerAnimation.DROP,
            map: this.map
          })
        }
      }
server/service/src/main/java/com/doumee/service/business/impl/UsersServiceImpl.java
@@ -697,10 +697,9 @@
        if(img1 ==null){
            return param.getImgurl();
        }
      /*  if(img1.getWidth() <200 && img1.getHeight()<100){
       /* if(img1.getWidth() <200 && img1.getHeight()<100){
            return  param.getImgurl();
        }
*/
        }*/
        String defualtHeader = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.USER_CARD_HEADER_IMG).getCode();
        String imgurl =StringUtils.isNotBlank(users.getImgurl())?path+(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.USERS_FILE).getCode())+users.getImgurl():defualtHeader;
        String url =null;
@@ -724,7 +723,6 @@
            url =  path+fileName;
        }
        return  url;
    }
    private String dealShareImgNoUser(ContentShareImgDto param, Users users, String shareFolder, String path) {
server/web/src/main/java/com/doumee/api/web/CustomerManageApi.java
@@ -2,7 +2,6 @@
import cn.hutool.http.HttpRequest;
import com.amazonaws.util.Md5Utils;
import com.amazonaws.util.StringUtils;
import com.doumee.biz.system.SystemDataPermissionBiz;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.biz.zbom.ZbomCRMService;
@@ -31,6 +30,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.Md5Crypt;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.tomcat.util.security.MD5Encoder;
import org.springframework.beans.factory.annotation.Autowired;
@@ -130,15 +130,18 @@
    @ApiOperation(value = "生成小程序码", notes = "PAD端")
    @PostMapping("/getQrCode")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "interfaceToken", value = "token", required = true),
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "timestamp", value = "时间戳", required = true),
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "sign", value = "签名(使用timestamp+appkey进行md5加密)", required = true),
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "timestamp", value = "时间戳(当前时间毫秒,2小时内有效)", required = true),
    })
    public void getQrCode(@RequestBody GenerateQRCodeRequest generateQRCodeRequest, HttpServletRequest httpServletRequest, HttpServletResponse response) {
        String interfaceToken = httpServletRequest.getHeader("interfaceToken");
        String timestamp = httpServletRequest.getHeader("timestamp");
    public void getQrCode(@RequestParam(value = "sign")String sign,
                          @RequestParam(value = "timestamp")Long timestamp,
                          @RequestBody GenerateQRCodeRequest generateQRCodeRequest,HttpServletResponse response) {
        if(StringUtils.isBlank(sign) || timestamp == null){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        String interfaceKey = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_PAD_INTERFACE_KEY).getCode();
        String token = DigestUtils.md5Hex(timestamp+interfaceKey);
        if(!token.equals(interfaceToken)){
        if(!token.equals(sign)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"token已失效!");
        }
        try{
wechat_staff/pages/userinfo/index.js
@@ -97,6 +97,7 @@
    var that = this
    const { userInfo } = this.data
    if (e.detail.avatarUrl) {
      console.log(e)
      wx.uploadFile({
        url: uploadUrl,
        filePath: e.detail.avatarUrl,