首页banner图
This commit is contained in:
parent
a5d998b02d
commit
b5341ed627
@ -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));
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -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<IndexBanner> {
|
||||||
|
}
|
@ -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<IndexBanner> selectIndexBannerList(int storeId);
|
||||||
|
}
|
@ -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<IndexBannerMapper, IndexBanner> implements IndexBannerService {
|
||||||
|
@Override
|
||||||
|
public List<IndexBanner> selectIndexBannerList(int storeId) {
|
||||||
|
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("store_id",storeId);
|
||||||
|
return baseMapper.selectList(queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
baseUrl: 'http://192.168.0.121:8080/',
|
baseUrl: 'http://192.168.0.121:8080/',
|
||||||
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
||||||
|
|
||||||
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
|
imagesUrl: 'https://www.tuofeng.cc/oilRescue',
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
|
@ -7,7 +7,7 @@ import share from './utils/share.js'
|
|||||||
Vue.mixin(share)
|
Vue.mixin(share)
|
||||||
const baseUrl = config.baseUrl
|
const baseUrl = config.baseUrl
|
||||||
Vue.prototype.$baseUrl = baseUrl;
|
Vue.prototype.$baseUrl = baseUrl;
|
||||||
|
Vue.prototype.$imageUrl = config.imageUrl;
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import './uni.promisify.adaptor'
|
import './uni.promisify.adaptor'
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
<!-- 顶部 -->
|
<!-- 顶部 -->
|
||||||
<view class="conttainer-top">
|
<view class="conttainer-top">
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<!-- <view style="width: 100%;height: 300px;">
|
<view style="width: 100%;height: 300px;">
|
||||||
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
|
<swiper class="swiper" style="width: 100%;height: 300px;" circular :indicator-dots="indicatorDots"
|
||||||
|
:autoplay="autoplay" :interval="interval"
|
||||||
:duration="duration">
|
:duration="duration">
|
||||||
<swiper-item v-for="(item,index) in list1" :key="index">
|
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
||||||
<view class="swiper-item uni-bg-red">A</view>
|
<view class="swiper-item uni-bg-red"></view>
|
||||||
<image :src="item"></image>
|
<image style="width: 100%;" :src="item.bannerUrl"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<view class="top-title">
|
<view class="top-title">
|
||||||
@ -206,12 +207,31 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isJoined()
|
this.isJoined()
|
||||||
|
this.getIndexBanner()
|
||||||
// this.isExistStoreId();
|
// this.isExistStoreId();
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
tabbar
|
tabbar
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
isJoined() {
|
||||||
request({
|
request({
|
||||||
@ -494,7 +514,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
// background-color: #3da4df;
|
// 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%;
|
background-size: 100% 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
let _this = this;
|
let _this = this;
|
||||||
let tempFilePath = e.detail.avatarUrl //上传的图片地址
|
let tempFilePath = e.detail.avatarUrl //上传的图片地址
|
||||||
let maxSizeInBytes = 1024*1024 //限制大小
|
let maxSizeInBytes = 1024*1024 //限制大小
|
||||||
|
console.log(111)
|
||||||
uni.getFileInfo({
|
uni.getFileInfo({
|
||||||
filePath:tempFilePath,
|
filePath:tempFilePath,
|
||||||
success(res) {
|
success(res) {
|
||||||
|
@ -193,8 +193,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
// this.orderNo = e.orderNo
|
this.orderNo = e.orderNo
|
||||||
this.orderNo = "234520231229140854e4c4ca"
|
// this.orderNo = "234520231229140854e4c4ca"
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getOilOrder();
|
this.getOilOrder();
|
||||||
@ -216,8 +216,8 @@
|
|||||||
oilCardLiters : this.oilCardRedece,
|
oilCardLiters : this.oilCardRedece,
|
||||||
balanceAmount : this.balanceRedece,
|
balanceAmount : this.balanceRedece,
|
||||||
isOilStorageCard : this.isOilStorageCard,
|
isOilStorageCard : this.isOilStorageCard,
|
||||||
// tankId : uni.getStorageSync("tankId"),
|
tankId : uni.getStorageSync("tankId"),
|
||||||
tankId : 6,
|
// tankId : 6,
|
||||||
};
|
};
|
||||||
let _this = this;
|
let _this = this;
|
||||||
request({
|
request({
|
||||||
@ -225,7 +225,7 @@
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: map,
|
data: map,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res,_this.appltType)
|
// console.log(res,_this.appltType)
|
||||||
let payProvider = "wxpay"
|
let payProvider = "wxpay"
|
||||||
if (_this.appltType== "WECHAT"){
|
if (_this.appltType== "WECHAT"){
|
||||||
payProvider = "wxpay"
|
payProvider = "wxpay"
|
||||||
|
Loading…
Reference in New Issue
Block a user