Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
937fcee22f
@ -3,7 +3,7 @@
|
|||||||
<el-card class="card">
|
<el-card class="card">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||||
<el-form-item label="店铺" prop="storeId">
|
<el-form-item label="店铺" prop="storeId">
|
||||||
<el-select v-model="queryParams.storeId" placeholder="请选择店铺" style="width: 100%">
|
<el-select v-model="queryParams.storeId" filterable placeholder="请选择店铺" clearable style="width: 100%">
|
||||||
<el-option v-for="item in storeList"
|
<el-option v-for="item in storeList"
|
||||||
:key="item.id" clearable
|
:key="item.id" clearable
|
||||||
:label="item.name" :value="item.id"
|
:label="item.name" :value="item.id"
|
||||||
@ -87,10 +87,10 @@
|
|||||||
:visible.sync="dialogVisible">
|
:visible.sync="dialogVisible">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="店铺" prop="storeId">
|
<el-form-item label="店铺" prop="storeId">
|
||||||
<el-select v-model="form.storeId" placeholder="请选择店铺" style="width: 100%">
|
<el-select v-model="form.storeId" filterable placeholder="请选择店铺" style="width: 100%">
|
||||||
<el-option v-for="item in storeList"
|
<el-option v-for="item in storeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name" :value="item.id"></el-option>
|
:label="item.name" :value="item.id+''"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="轮播图" prop="bannerUrl">
|
<el-form-item label="轮播图" prop="bannerUrl">
|
||||||
@ -235,18 +235,17 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id){
|
if (this.form.id){
|
||||||
updateIndexBanner(this.form).then(res => {
|
updateIndexBanner(this.form).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.data==1){
|
if (res.data==1){
|
||||||
this.$modal.msgSuccess("修改成功")
|
this.$modal.msgSuccess("修改成功")
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
this.flag = false
|
this.flag = false
|
||||||
|
this.queryParams.page = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getStoreList()
|
this.getStoreList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
addIndexBanner(this.form).then(res => {
|
addIndexBanner(this.form).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.data==1){
|
if (res.data==1){
|
||||||
this.$modal.msgSuccess("添加成功")
|
this.$modal.msgSuccess("添加成功")
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
|
@ -56,7 +56,7 @@ public class IndexBannerController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseObject add(@RequestBody IndexBanner indexBanner){
|
public ResponseObject add(@RequestBody IndexBanner indexBanner){
|
||||||
return getSuccessResult(indexBannerService.insertIndexBanner(indexBanner,null));
|
return getSuccessResult(indexBannerService.insertIndexBanner(indexBanner,indexBanner.getStoreId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -666,93 +666,95 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
|||||||
if (StringUtils.isNotEmpty(gradeId)) {
|
if (StringUtils.isNotEmpty(gradeId)) {
|
||||||
LJStore store = iljStoreService.selectStoreByStoreId(storeId);
|
LJStore store = iljStoreService.selectStoreByStoreId(storeId);
|
||||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
if (ObjectUtils.isNotEmpty(chainStoreConfig)) {
|
||||||
if (isEnableLevel.equals("yes")) {
|
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||||
|
if (isEnableLevel.equals("yes")) {
|
||||||
|
|
||||||
LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId);
|
LJUserGrade ljUserGrade = ljUserGradeMapper.selectAllByGradeId(gradeId);
|
||||||
if (ObjectUtils.isNotEmpty(ljUserGrade)) {
|
if (ObjectUtils.isNotEmpty(ljUserGrade)) {
|
||||||
if (oilTypebyId.equals("汽油")) {
|
if (oilTypebyId.equals("汽油")) {
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
|
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("gasolineRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3");
|
BigDecimal gasolineRule3 = jsonObject.getBigDecimal("gasolineRule3");
|
||||||
BigDecimal multiply = divide.multiply(gasolineRule3);
|
BigDecimal multiply = divide.multiply(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1");
|
BigDecimal gasolineRule1 = jsonObject.getBigDecimal("gasolineRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(gasolineRule1) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(gasolineRule1) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2");
|
Integer gasolineRule3 = jsonObject.getInteger("gasolineRule2");
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (oilTypebyId.equals("柴油")) {
|
||||||
if (oilTypebyId.equals("柴油")) {
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
|
||||||
|
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3");
|
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("dieselRule3");
|
||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String gasolineRule = ljUserGrade.getDieselRule();
|
String gasolineRule = ljUserGrade.getDieselRule();
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("dieselRule1");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
//升数
|
//升数
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("dieselRule2");
|
Integer gasolineRule3 = jsonObject.getInteger("dieselRule2");
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (oilTypebyId.equals("天然气")) {
|
||||||
|
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
||||||
|
|
||||||
}
|
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
||||||
if (oilTypebyId.equals("天然气")) {
|
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
||||||
if (ljUserGrade.getGasolineDiscount().equals("无优惠")) {
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
||||||
} else if (ljUserGrade.getGasolineDiscount().equals("每升优惠")) {
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
||||||
String gasolineRule = ljUserGrade.getNaturalGasRule();
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
//升数
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule3"))).get();
|
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3");
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
BigDecimal multiply = divide.multiply(bigDecimal2);
|
||||||
//升数
|
paymentActiveVO.setMemberFavorableAmount(multiply);
|
||||||
BigDecimal divide = paymentActiveDTO.getAmount().divide(bigDecimal1, 2, RoundingMode.HALF_UP);
|
}
|
||||||
BigDecimal bigDecimal2 = jsonObject.getBigDecimal("naturalGas3");
|
} else {
|
||||||
BigDecimal multiply = divide.multiply(bigDecimal2);
|
String gasolineRule = ljUserGrade.getGasolineRule();
|
||||||
paymentActiveVO.setMemberFavorableAmount(multiply);
|
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
||||||
}
|
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
||||||
} else {
|
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
||||||
String gasolineRule = ljUserGrade.getGasolineRule();
|
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
||||||
List<JSONObject> jsonObjects = JSONArray.parseArray(gasolineRule, JSONObject.class);
|
//升数
|
||||||
JSONObject jsonObject = jsonObjects.stream().max(Comparator.comparingDouble(o -> o.getDouble("gasolineRule2"))).get();
|
Integer gasolineRule3 = jsonObject.getInteger("naturalGas2");
|
||||||
BigDecimal bigDecimal = jsonObject.getBigDecimal("naturalGas1");
|
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
||||||
if (paymentActiveDTO.getAmount().compareTo(bigDecimal) >= 0) {
|
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
||||||
//升数
|
}
|
||||||
Integer gasolineRule3 = jsonObject.getInteger("naturalGas2");
|
|
||||||
BigDecimal bigDecimal2 = BigDecimal.valueOf(gasolineRule3);
|
|
||||||
paymentActiveVO.setMemberFavorableAmount(bigDecimal2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,8 +95,10 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LJStaff selectStaffByMobile(String mobile) {
|
public LJStaff selectStaffByMobile(String mobile) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("mobile",mobile);
|
queryWrapper.eq("mobile",mobile);
|
||||||
|
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||||
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
||||||
return staff;
|
return staff;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,18 @@ public class ChainStoreConfigServiceImpl extends ServiceImpl<ChainStoreConfigMap
|
|||||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("chain_store_id",store.getChainStoreId());
|
queryWrapper.eq("chain_store_id",store.getChainStoreId());
|
||||||
return baseMapper.selectOne(queryWrapper);
|
ChainStoreConfig chainStoreConfig = baseMapper.selectOne(queryWrapper);
|
||||||
|
if (ObjectUtil.isEmpty(chainStoreConfig)){
|
||||||
|
ChainStoreConfig chainStoreConfig1 = new ChainStoreConfig();
|
||||||
|
chainStoreConfig1.setChainStoreId(store.getChainStoreId());
|
||||||
|
chainStoreConfig1.setIsEnableLevel("no");
|
||||||
|
chainStoreConfig1.setIsMonthClear("clear_month");
|
||||||
|
chainStoreConfig1.setGasGrowthValue("1");
|
||||||
|
chainStoreConfig1.setDieselGrowthValue("1");
|
||||||
|
chainStoreConfig1.setNaturalGrowthValue("1");
|
||||||
|
baseMapper.insert(chainStoreConfig1);
|
||||||
|
}
|
||||||
|
chainStoreConfig = baseMapper.selectOne(queryWrapper);
|
||||||
|
return chainStoreConfig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ export default {
|
|||||||
getList(){
|
getList(){
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
||||||
// this.queryParams.mtUserId = this.userId
|
this.queryParams.mtUserId = this.userId
|
||||||
getCardFavorableList(this.queryParams).then(res=>{
|
getCardFavorableList(this.queryParams).then(res=>{
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function(e) {
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
uni.setStorageSync("appltType","WECHAT")
|
uni.setStorageSync("appltType","WECHAT")
|
||||||
|
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
// baseUrl: 'http://192.168.0.196:8081/',
|
// baseUrl: 'http://192.168.0.196:8081/',
|
||||||
// baseUrl: 'http://192.168.1.4:8080/',
|
// baseUrl: 'http://192.168.1.4:8080/',
|
||||||
|
|
||||||
baseUrl: 'http://192.168.0.178:8008/',
|
baseUrl: 'http://192.168.0.121:8080/',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,8 +9,11 @@
|
|||||||
<swiper class="swiper" style="width: 100%;height: 300px;" circular :indicator-dots="indicatorDots"
|
<swiper class="swiper" style="width: 100%;height: 300px;" circular :indicator-dots="indicatorDots"
|
||||||
:autoplay="autoplay" :interval="interval" :duration="duration">
|
:autoplay="autoplay" :interval="interval" :duration="duration">
|
||||||
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
|
||||||
<view class="swiper-item uni-bg-red"></view>
|
<view class="swiper-item uni-bg-red">
|
||||||
<image style="width: 100%;" :src="item.bannerUrl"></image>
|
|
||||||
|
<image style="width: 100%;" :src="item.bannerUrl"></image>
|
||||||
|
</view>
|
||||||
|
<!-- <image style="width: 100%;" :src="getBannerUrl(item.bannerUrl)"></image> -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -114,7 +117,7 @@
|
|||||||
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
|
<!-- <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker> -->
|
||||||
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false"
|
<u-picker :columns="columns" @confirm="confirm" :show="show" @cancel="show = false"
|
||||||
keyName="label"></u-picker>
|
keyName="label"></u-picker>
|
||||||
<u-overlay :show="shows">
|
<u-overlay :show="shows == true">
|
||||||
<image src="../../static/imgs/zzxryl.png"
|
<image src="../../static/imgs/zzxryl.png"
|
||||||
style="width: 280px; height: 350px; margin: 20px auto; margin-top: 200px; ">
|
style="width: 280px; height: 350px; margin: 20px auto; margin-top: 200px; ">
|
||||||
</image>
|
</image>
|
||||||
@ -238,6 +241,16 @@ import { callWithErrorHandling } from "vue"
|
|||||||
tabbar
|
tabbar
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 返回图片路径
|
||||||
|
getBannerUrl(url){
|
||||||
|
let imgurl = ""
|
||||||
|
if (url.includes("http")){
|
||||||
|
imgurl = url
|
||||||
|
}else {
|
||||||
|
imgurl = this.baseUrl + url
|
||||||
|
}
|
||||||
|
return imgurl;
|
||||||
|
},
|
||||||
// 跳转banner图对应的页面
|
// 跳转banner图对应的页面
|
||||||
goPage(url) {
|
goPage(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -246,12 +259,21 @@ import { callWithErrorHandling } from "vue"
|
|||||||
},
|
},
|
||||||
// 获取首页轮播图信息
|
// 获取首页轮播图信息
|
||||||
getIndexBanner() {
|
getIndexBanner() {
|
||||||
|
let _this = this
|
||||||
if (uni.getStorageSync("storeId")) {
|
if (uni.getStorageSync("storeId")) {
|
||||||
request({
|
request({
|
||||||
url: 'business/indexBanner/list/' + uni.getStorageSync("storeId"),
|
url: 'business/indexBanner/list/' + uni.getStorageSync("storeId"),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.list1 = res.data
|
_this.list1 = res.data
|
||||||
|
for (let i = 0;i<res.data.length;i++){
|
||||||
|
if (res.data[i].bannerUrl.includes("http")){
|
||||||
|
_this.list1[i].bannerUrl = res.data[i].bannerUrl
|
||||||
|
}else{
|
||||||
|
_this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(_this.list1);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -434,6 +456,8 @@ import { callWithErrorHandling } from "vue"
|
|||||||
_this.list3.push(_this.baseUrl + item)
|
_this.list3.push(_this.baseUrl + item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_this.getIndexBanner()
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
@ -526,7 +550,7 @@ import { callWithErrorHandling } from "vue"
|
|||||||
address,
|
address,
|
||||||
latitude,
|
latitude,
|
||||||
longitude
|
longitude
|
||||||
}) => { // 选择位置完成后的处理
|
}) => { // 选择位置完成后的处理
|
||||||
// this.addressName = address;
|
// this.addressName = address;
|
||||||
console.log(name, address, latitude, longitude);
|
console.log(name, address, latitude, longitude);
|
||||||
this.longitude = longitude;
|
this.longitude = longitude;
|
||||||
@ -838,4 +862,4 @@ import { callWithErrorHandling } from "vue"
|
|||||||
color: white;
|
color: white;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<view class="top-box">
|
<view class="top-box">
|
||||||
<view class="dis" style="width: 78%;">
|
<view class="dis" style="width: 78%;">
|
||||||
<view class="top-img">
|
<view class="top-img">
|
||||||
<image v-if="store.logo==''||store.logo==null||store.logo==undefined" src="../../static/logo.png" mode="aspectFit"></image>
|
<image v-if="!store.logo" src="../../static/logo.png" mode="aspectFit"></image>
|
||||||
<image v-else :src="baseUrl+store.logo" mode="aspectFit"></image>
|
<image v-else :src="baseUrl+store.logo" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 80%;">
|
<view style="width: 80%;">
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-ALIPAY -->
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
<!-- <button class="dl-box" open-type="getPhoneNumber" @getphonenumber="getUserLogin">手机号快捷登录</button> -->
|
<!-- <button class="dl-box" open-type="getPhoneNumber" @getphonenumber="getUserLogin">手机号快捷登录</button> -->
|
||||||
<button open-type="getAuthorize" scope='phoneNumber' class="dl-box" hover-class="button-active"
|
<button open-type="getAuthorize" scope='phoneNumber' class="dl-box" hover-class="button-active"
|
||||||
@getAuthorize="getUserLogin">手机号快捷登录</button>
|
@getAuthorize="getUserLogin">手机号快捷登录</button>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<button class="kk-box" @click="goback">我再看看</button>
|
<button class="kk-box" @click="goback">我再看看</button>
|
||||||
@ -23,9 +23,9 @@
|
|||||||
<view class="lanquanzi" v-if="qindex == true" @click="qindex =! qindex"><u-icon name="checkbox-mark"
|
<view class="lanquanzi" v-if="qindex == true" @click="qindex =! qindex"><u-icon name="checkbox-mark"
|
||||||
color="#ffffff" size="14"></u-icon></view>
|
color="#ffffff" size="14"></u-icon></view>
|
||||||
<text>请仔细阅读</text>
|
<text>请仔细阅读</text>
|
||||||
<text class="lan">《用户协议》</text>
|
<text class="lan" @click="gopv()">《用户协议》</text>
|
||||||
<text>和</text>
|
<text>和</text>
|
||||||
<text class="lan">《隐私政策》</text>
|
<text class="lan" @click="gopv()">《隐私政策》</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -48,6 +48,12 @@
|
|||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
gopv() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesLogin/login/webview'
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
// 获取支付宝userid
|
// 获取支付宝userid
|
||||||
getUserLogin(e) {
|
getUserLogin(e) {
|
||||||
// if (this.qindex == false) {
|
// if (this.qindex == false) {
|
||||||
@ -61,7 +67,7 @@
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
|
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
||||||
my.getPhoneNumber({
|
my.getPhoneNumber({
|
||||||
scopes: 'auth_base',
|
scopes: 'auth_base',
|
||||||
success: res1 => {
|
success: res1 => {
|
||||||
@ -83,15 +89,16 @@
|
|||||||
storeId: 0,
|
storeId: 0,
|
||||||
staffId: "",
|
staffId: "",
|
||||||
phone: "18457621459",
|
phone: "18457621459",
|
||||||
encryptedData:encryptedData,
|
encryptedData: encryptedData,
|
||||||
},
|
},
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
|
|
||||||
uni.setStorageSync('App-Token', resp.data.token);
|
uni.setStorageSync('App-Token', resp.data.token);
|
||||||
uni.setStorageSync('chainStoreId', resp.data.chainStoreId);
|
uni.setStorageSync('chainStoreId', resp.data
|
||||||
|
.chainStoreId);
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
@ -104,8 +111,8 @@
|
|||||||
console.log('my.getAuthCode 调用失败', err)
|
console.log('my.getAuthCode 调用失败', err)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.log('my.getAuthCode 调用失败', err)
|
console.log('my.getAuthCode 调用失败', err)
|
||||||
@ -366,4 +373,4 @@
|
|||||||
border: 1px solid #0078FF;
|
border: 1px solid #0078FF;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -60,7 +60,7 @@
|
|||||||
<text>评价有礼</text>
|
<text>评价有礼</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="item.orderStatus=='unpaid'" class="end-box" @click="goPayment()">
|
<view v-else-if="item.orderStatus=='unpaid'" class="end-box" @click="goPayment(item.orderNo)">
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
<text>去支付</text>
|
<text>去支付</text>
|
||||||
</view>
|
</view>
|
||||||
@ -403,8 +403,10 @@
|
|||||||
// this.getBalanceOrder()
|
// this.getBalanceOrder()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goPayment(){
|
goPayment(orderNo){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
goComment() {
|
goComment() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
<button class="box-hang" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||||
<view class="">头像</view>
|
<view class="">头像</view>
|
||||||
<view class="touxiang">
|
<view class="touxiang">
|
||||||
@ -14,6 +15,16 @@
|
|||||||
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</button>
|
</button>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
|
<button class="box-hang" @click="onChooseAvatar1">
|
||||||
|
<view class="">头像</view>
|
||||||
|
<view class="touxiang">
|
||||||
|
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined" :src="baseUrl + user.avatar" mode="aspectFit"></image>
|
||||||
|
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
|
||||||
|
</view>
|
||||||
|
</button>
|
||||||
|
<!-- #endif -->
|
||||||
<view class="box-hang" @click="goEdit(0)">
|
<view class="box-hang" @click="goEdit(0)">
|
||||||
<view class="">昵称</view>
|
<view class="">昵称</view>
|
||||||
<view class="dis">
|
<view class="dis">
|
||||||
@ -99,6 +110,30 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 用户选择头像
|
||||||
|
onChooseAvatar1(e){
|
||||||
|
let _this = this;
|
||||||
|
//从本地相册选择图片或使用相机拍照
|
||||||
|
uni.chooseImage({
|
||||||
|
sourceType: ['album', 'camera'],//选择方式相册或者相机
|
||||||
|
success: (res) => {
|
||||||
|
console.log('图片', res)
|
||||||
|
var tempFilePath = res.tempFilePaths;
|
||||||
|
var filePath = tempFilePath[0];
|
||||||
|
console.log(filePath);//输出本地头像路径
|
||||||
|
//调用上传下载api
|
||||||
|
// 将图片上传服务器
|
||||||
|
upload({
|
||||||
|
url: '/clientApi/file/upload',
|
||||||
|
filePath: filePath,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log('images', res.data.fileName);
|
||||||
|
_this.user.avatar = res.data.fileName
|
||||||
|
_this.editUser()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 修改用户信息
|
// 修改用户信息
|
||||||
editUser(){
|
editUser(){
|
||||||
request({
|
request({
|
||||||
|
Loading…
Reference in New Issue
Block a user