This commit is contained in:
cun-nan 2024-01-23 18:14:56 +08:00
parent 15ca62967e
commit cf631ad033
9 changed files with 76 additions and 20 deletions

View File

@ -91,7 +91,7 @@ export default {
}).then((AMap) => {
this.map = new AMap.Map("container", {
viewMode: "2D", //3D
zoom: 11, //
zoom: 16, //
center: [_this.form.lng, _this.form.lat], //
});
// console.log(this.map.center)

View File

@ -633,7 +633,9 @@ export default {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.auditPrem = this.form.auditPrem.toString();
if (this.form.auditPrem){
this.form.auditPrem = this.form.auditPrem.toString();
}
if (!this.form.id) {
queryStaff({mobile:this.form.mobile}).then( response => {
if(response.data!=null){
@ -676,7 +678,7 @@ export default {
this.form.refundPassword = '123456'
this.open = true;
this.title = "编辑员工信息";
if (this.form.auditPrem.length > 0){
if (this.form.auditPrem && this.form.auditPrem.length > 0){
// this.form.auditPrem = this.form.auditPrem.split(",");
this.auditPrem = []
this.auditPrem = this.form.auditPrem.split(",");

View File

@ -7,7 +7,11 @@ import com.alipay.api.response.AlipaySystemOauthTokenResponse;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
@ -38,6 +42,10 @@ public class AlipayController extends BaseController {
private LJUserService userService;
@Autowired
private ILJStoreService iljStoreService;
@Autowired
private UserBalanceService userBalanceService;
@Autowired
private LJUserGradeService ljUserGradeService;
/**
* 获取支付宝userId
@ -80,6 +88,25 @@ public class AlipayController extends BaseController {
userService.addUser(ljUser);
}
LJUser ljUser = userService.selectUserByMobile(mobile);
// 根据userid和连锁店id查询是否存在对应的余额信息
UserBalance userBalance = userBalanceService.selectUserBalance(ljUser.getId(), ljStore.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) {
// 新增余额信息
UserBalance userBalanceAdd = new UserBalance();
userBalanceAdd.setMtUserId(ljUser.getId());
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
userBalanceAdd.setChainStoreId(ljStore.getChainStoreId());
userBalanceAdd.setCardBalance(0.0);
userBalanceAdd.setPoints(0);
userBalanceAdd.setGrowthValue(0);
userBalanceAdd.setConsumeNum(0);
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
userBalanceAdd.setGradeId(ljUserGrade.getId());
}
// 新增会员余额信息
userBalanceService.insertUserBalance(userBalanceAdd);
}
String userAgent = request.getHeader("user-agent");
AccountInfo accountInfo = new AccountInfo();

View File

@ -184,7 +184,8 @@ import { callWithErrorHandling } from "vue"
},
onLoad(query) {
if (query.storeId) {
uni.setStorageSync("y_storeId", query.storeId)
// uni.setStorageSync("y_storeId", query.storeId)
uni.setStorageSync("storeId", query.storeId)
}
if (query.type) {
uni.setStorageSync("y_type", query.type)
@ -435,6 +436,7 @@ import { callWithErrorHandling } from "vue"
uni.setStorageSync("storeId", response.data.store.id)
uni.setStorageSync("chainStoreId", response.data.store
.chainStoreId)
console.log(uni.getStorageSync("chainStoreId"));
let welfare = response.data.store.welfare
if (welfare) {
if (welfare.includes(",")) {

View File

@ -86,13 +86,13 @@
method: 'post',
data: {
authCode: authCode,
storeId: 0,
storeId: uni.getStorageSync("storeId"),
staffId: "",
phone: "18457621459",
encryptedData: encryptedData,
},
}).then((resp) => {
console.log(resp)
// console.log(resp)
if (resp.code == 200) {
uni.setStorageSync('App-Token', resp.data.token);
@ -210,7 +210,8 @@
url: "clientApi/sign/alipayLogin/getUserid",
method: 'post',
data: {
storeId: uni.getStorageSync("y_storeId"),
storeId: uni.getStorageSync("storeId"),
// storeId: uni.getStorageSync("y_storeId"),
type: uni.getStorageSync("y_type"),
userId: uni.getStorageSync("y_userId"),
},

View File

@ -13,10 +13,11 @@
<view class="c-box-top">您对工作人员满意吗</view>
<view class="dis">
<view class="touxiang">
<image src="../../static/imgs/myx.png" mode="aspectFit"></image>
<image v-if="user.avatar" :src="baseUrl + user.avatar" mode="aspectFit"></image>
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
</view>
<view class="">
<view class="username">username(13583017106)</view>
<view class="username">{{user.name?user.name:"未填写"}}({{user.mobile}})</view>
<view class="">
<u-rate active-color="#ffd74e" :count="count" v-model="value"></u-rate>
</view>
@ -38,13 +39,14 @@
</template>
<script>
import request from "../../utils/request";
export default {
data() {
return {
title: '',
description: '您的宝贵建议,就是我们前进的动力~动动手指,帮助我们做得更好~~',
count: 10,
value: 2,
value: 0,
value1: '',
textlist: [{
text: '外瑞古德'
@ -67,16 +69,30 @@
{
text: ''
},
]
],
user:{},
// url
baseUrl: this.$baseUrl,
}
},
onShow() {
this.getUser()
},
components: {
},
methods: {
//
getUser(){
request({
url: 'business/userManager/user/getUser',
method: 'get',
}).then(res => {
if (res.data) {
this.user = res.data
}
})
},
goback() {
uni.navigateBack()
}

View File

@ -64,11 +64,13 @@
data() {
return {
title: '',
orderId:"",
}
},
onLoad(e) {
this.orderId = e.orderId
},
components: {
},

View File

@ -28,7 +28,7 @@
@scrolltolower="scrolltolower">
<!-- 油品订单列表 -->
<view class="box-order" v-for="(item,index) in list" :key="index">
<view class="or-box-top">
<view class="or-box-top" @click="goOrderInfo">
<view class="">{{getStoreName(storeList,item.storeId)}}</view>
<!-- <view class="chengg">{{getPayName(payList,item.orderStatus)}}</view> -->
<view class="chengg" v-if="item.orderStatus=='paid'">已支付</view>
@ -42,15 +42,15 @@
<view class="huis">订单类型</view>
<view class="">油品订单</view>
</view> -->
<view class="but-box">
<view class="but-box" @click="goOrderInfo">
<view class="huis">订单金额</view>
<view class="">{{item.orderAmount}}</view>
</view>
<view class="but-box">
<view class="but-box" @click="goOrderInfo">
<view class="huis">优惠合计</view>
<view class="reds">{{item.discountAmount}}</view>
</view>
<view class="but-box">
<view class="but-box" @click="goOrderInfo">
<view class="huis">订单时间</view>
<view class="" v-if="item.orderStatus=='paid'">{{parseTime(item.payTime)}}</view>
<view class="" v-else>{{item.createTime}}</view>
@ -408,6 +408,11 @@
url: '/pagesRefuel/orderDetail/index?orderNo=' + orderNo,
})
},
goOrderInfo(orderId){
uni.navigateTo({
url: '/pagesMy/details/details?orderId=' + orderId,
})
},
goComment() {
uni.navigateTo({
url: "/pagesMy/comment/comment"

View File

@ -320,6 +320,7 @@
title:res.data.error,
icon:"none"
})
_this.goBack()
return;
}
if(res.data.success == "ok"){