diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/controller/IndexBannerController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/controller/IndexBannerController.java new file mode 100644 index 000000000..a5c820b3e --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/controller/IndexBannerController.java @@ -0,0 +1,22 @@ +package com.fuint.business.indexBanner.controller; + +import com.fuint.business.indexBanner.service.IndexBannerService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/business/indexBanner") +public class IndexBannerController extends BaseController { + @Autowired + private IndexBannerService indexBannerService; + + @GetMapping("/list/{storeId}") + public ResponseObject list(@PathVariable Integer storeId){ + return getSuccessResult(indexBannerService.selectIndexBannerList(storeId)); + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/entity/IndexBanner.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/entity/IndexBanner.java new file mode 100644 index 000000000..650a70f56 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/entity/IndexBanner.java @@ -0,0 +1,123 @@ +package com.fuint.business.indexBanner.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fuint.framework.entity.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.io.Serializable; + +/** + * 首页轮播图(IndexBanner)实体类 + */ +@Data +@TableName("index_banner") +@ApiModel(value = "IndexBanner对象", description = "首页轮播图") +public class IndexBanner extends BaseEntity implements Serializable { + private static final long serialVersionUID = 1L; + /** + * 自增ID + */ + @ApiModelProperty("自增ID") + @TableId(value = "ID", type = IdType.AUTO) + private Integer id; + /** + * 店铺id + */ + private Integer storeId; + /** + * 轮播图地址 + */ + private String bannerUrl; + /** + * 路由地址 + */ + private String routeUrl; + /** + * 创建时间 + */ + private Date createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新人 + */ + private String updateBy; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getBannerUrl() { + return bannerUrl; + } + + public void setBannerUrl(String bannerUrl) { + this.bannerUrl = bannerUrl; + } + + public String getRouteUrl() { + return routeUrl; + } + + public void setRouteUrl(String routeUrl) { + this.routeUrl = routeUrl; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/mapper/IndexBannerMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/mapper/IndexBannerMapper.java new file mode 100644 index 000000000..15d31dfa0 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/mapper/IndexBannerMapper.java @@ -0,0 +1,7 @@ +package com.fuint.business.indexBanner.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.indexBanner.entity.IndexBanner; + +public interface IndexBannerMapper extends BaseMapper { +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/IndexBannerService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/IndexBannerService.java new file mode 100644 index 000000000..fed42c45f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/IndexBannerService.java @@ -0,0 +1,13 @@ +package com.fuint.business.indexBanner.service; + +import com.fuint.business.indexBanner.entity.IndexBanner; + +import java.util.List; + +public interface IndexBannerService { + /** + * 根据店铺id查询首页banner图 + * @return + */ + List selectIndexBannerList(int storeId); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java new file mode 100644 index 000000000..d6aabcf4c --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java @@ -0,0 +1,22 @@ +package com.fuint.business.indexBanner.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.indexBanner.entity.IndexBanner; +import com.fuint.business.indexBanner.mapper.IndexBannerMapper; +import com.fuint.business.indexBanner.service.IndexBannerService; +import com.fuint.common.dto.AccountInfo; +import com.fuint.common.util.TokenUtil; +import org.springframework.stereotype.Service; + +import java.util.List; +@Service +public class IndexBannerServiceImpl extends ServiceImpl implements IndexBannerService { + @Override + public List selectIndexBannerList(int storeId) { +// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("store_id",storeId); + return baseMapper.selectList(queryWrapper); + } +} diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js index 6795f0a38..c294d620a 100644 --- a/gasStation-uni/config.js +++ b/gasStation-uni/config.js @@ -5,7 +5,7 @@ module.exports = { baseUrl: 'http://192.168.0.121:8080/', // baseUrl: 'http://192.168.1.5:8002/cdJdc', - imagesUrl: 'http://www.nuoyunr.com/lananRsc', + imagesUrl: 'https://www.tuofeng.cc/oilRescue', // 应用信息 appInfo: { // 应用名称 diff --git a/gasStation-uni/main.js b/gasStation-uni/main.js index ed964ca52..d197a4404 100644 --- a/gasStation-uni/main.js +++ b/gasStation-uni/main.js @@ -7,7 +7,7 @@ import share from './utils/share.js' Vue.mixin(share) const baseUrl = config.baseUrl Vue.prototype.$baseUrl = baseUrl; - +Vue.prototype.$imageUrl = config.imageUrl; // #ifndef VUE3 import Vue from 'vue' import './uni.promisify.adaptor' diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 248497e71..d446c871d 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -5,15 +5,16 @@ - + @@ -206,12 +207,31 @@ }, onShow() { this.isJoined() + this.getIndexBanner() // this.isExistStoreId(); }, components: { tabbar }, methods: { + // 跳转banner图对应的页面 + goPage(url){ + uni.navigateTo({ + url:url, + }) + }, + // 获取首页轮播图信息 + getIndexBanner(){ + if (uni.getStorageSync("storeId")){ + request({ + url: 'business/indexBanner/list/'+uni.getStorageSync("storeId"), + method: 'get', + }).then(res => { + console.log(res) + this.list1 = res.data + }) + } + }, //判断是否是新人 isJoined() { request({ @@ -494,7 +514,7 @@ width: 100%; height: 250px; // background-color: #3da4df; - background: url('http://47.95.206.185:83/topbj.png')center no-repeat; + // background: url('http://47.95.206.185:83/topbj.png')center no-repeat; background-size: 100% 100%; position: relative; margin-bottom: 60px; diff --git a/gasStation-uni/pagesMy/setup/index.vue b/gasStation-uni/pagesMy/setup/index.vue index 272ecacea..7782efd47 100644 --- a/gasStation-uni/pagesMy/setup/index.vue +++ b/gasStation-uni/pagesMy/setup/index.vue @@ -72,6 +72,7 @@ let _this = this; let tempFilePath = e.detail.avatarUrl //上传的图片地址 let maxSizeInBytes = 1024*1024 //限制大小 + console.log(111) uni.getFileInfo({ filePath:tempFilePath, success(res) { diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index b6ca50635..a66337e1c 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -193,8 +193,8 @@ } }, onLoad(e) { - // this.orderNo = e.orderNo - this.orderNo = "234520231229140854e4c4ca" + this.orderNo = e.orderNo + // this.orderNo = "234520231229140854e4c4ca" }, onShow() { this.getOilOrder(); @@ -216,8 +216,8 @@ oilCardLiters : this.oilCardRedece, balanceAmount : this.balanceRedece, isOilStorageCard : this.isOilStorageCard, - // tankId : uni.getStorageSync("tankId"), - tankId : 6, + tankId : uni.getStorageSync("tankId"), + // tankId : 6, }; let _this = this; request({ @@ -225,7 +225,7 @@ method: 'post', data: map, }).then(res => { - console.log(res,_this.appltType) + // console.log(res,_this.appltType) let payProvider = "wxpay" if (_this.appltType== "WECHAT"){ payProvider = "wxpay"