Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3c82e2e420
@ -8,7 +8,7 @@ export function ljStoreInfo() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询店铺详细
|
// 查询所有店铺信息
|
||||||
export function ljStoreList() {
|
export function ljStoreList() {
|
||||||
return request({
|
return request({
|
||||||
url: '/business/storeInformation/store/list',
|
url: '/business/storeInformation/store/list',
|
||||||
@ -16,6 +16,14 @@ export function ljStoreList() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据连锁店id查询店铺信息
|
||||||
|
export function storesList() {
|
||||||
|
return request({
|
||||||
|
url: '/business/storeInformation/store/stores',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 修改店铺信息
|
// 修改店铺信息
|
||||||
export function updateStore(data) {
|
export function updateStore(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -709,6 +709,7 @@ export default {
|
|||||||
this.pddhidlist.push(row.id)
|
this.pddhidlist.push(row.id)
|
||||||
console.log(row)
|
console.log(row)
|
||||||
let data ={
|
let data ={
|
||||||
|
giftUserType:0,//邀请人获得
|
||||||
activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
activeGift: 2, //活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||||
goodsIds: "", //商品id
|
goodsIds: "", //商品id
|
||||||
goodsName:"" , //商品名称
|
goodsName:"" , //商品名称
|
||||||
@ -908,6 +909,7 @@ export default {
|
|||||||
console.log(this.ruleForm.activeRecommendChildList)
|
console.log(this.ruleForm.activeRecommendChildList)
|
||||||
console.log(this.ruleForm)
|
console.log(this.ruleForm)
|
||||||
this.ruleForm.id = 1
|
this.ruleForm.id = 1
|
||||||
|
|
||||||
this.$refs["ruleForm"].validate(valid => {
|
this.$refs["ruleForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.ruleForm.id != null) {
|
if (this.ruleForm.id != null) {
|
||||||
|
@ -311,7 +311,7 @@
|
|||||||
placeholder="会员等级"
|
placeholder="会员等级"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
>
|
>
|
||||||
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
|
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -334,7 +334,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="会员初始积分" prop="points">
|
<el-form-item label="会员初始积分" prop="points">
|
||||||
<el-input v-model="form.points" placeholder="请输入会员初始积分" maxlength="30"/>
|
<el-input :disabled="title == '编辑会员'" v-model="form.points" placeholder="请输入会员初始积分" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -348,7 +348,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="储值通用余额" prop="cardBalance">
|
<el-form-item label="储值通用余额" prop="cardBalance">
|
||||||
<el-input v-model="form.cardBalance" placeholder="请输入储值卡初始余额" maxlength="30"/>
|
<el-input :disabled="title == '编辑会员'" v-model="form.cardBalance" placeholder="请输入储值卡初始余额" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -390,7 +390,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 批量录入会员信息-->
|
<!-- 批量录入会员信息-->
|
||||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openUpload" append-to-body>
|
<el-dialog :title="title" :visible.sync="openUpload" append-to-body>
|
||||||
<div style="height: 60px;line-height: 30px">
|
<div style="height: 60px;line-height: 30px">
|
||||||
<div> 第一步: 下载示例模板,按照模板填写会员数据,手机号为必填项 </div>
|
<div> 第一步: 下载示例模板,按照模板填写会员数据,手机号为必填项 </div>
|
||||||
<a style="margin-left: 50px;color: #00afff"
|
<a style="margin-left: 50px;color: #00afff"
|
||||||
@ -454,7 +454,7 @@ import {
|
|||||||
updateUser
|
updateUser
|
||||||
} from "@/api/staff/user/user";
|
} from "@/api/staff/user/user";
|
||||||
import {allUserGrade, listUserGrade} from "@/api/staff/user/usergrade";
|
import {allUserGrade, listUserGrade} from "@/api/staff/user/usergrade";
|
||||||
import {ljStoreList} from "@/api/staff/store";
|
import {ljStoreList, storesList} from "@/api/staff/store";
|
||||||
import {getSysConfig} from "@/api/staff/user/sysconfig";
|
import {getSysConfig} from "@/api/staff/user/sysconfig";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import {paymentApi} from "@/api/payment/fypay";
|
import {paymentApi} from "@/api/payment/fypay";
|
||||||
@ -608,7 +608,7 @@ export default {
|
|||||||
listUserGrade({page:1,pageSize:20}).then( response => {
|
listUserGrade({page:1,pageSize:20}).then( response => {
|
||||||
this.userGradeList = response.data.records;
|
this.userGradeList = response.data.records;
|
||||||
});
|
});
|
||||||
ljStoreList().then( response => {
|
storesList().then( response => {
|
||||||
this.storeList = response.data
|
this.storeList = response.data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -25,14 +25,16 @@
|
|||||||
<el-descriptions-item label="手机号">{{form.mobile}}
|
<el-descriptions-item label="手机号">{{form.mobile}}
|
||||||
<el-tag size="mini" @click="replaceMobile">更换</el-tag>
|
<el-tag size="mini" @click="replaceMobile">更换</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="会员昵称">{{form.name}}</el-descriptions-item>
|
<el-descriptions-item label="会员昵称">
|
||||||
<el-descriptions-item label="实体卡号">{{form.idcard}}</el-descriptions-item>
|
<span style="color: #00afff" @click="changeName">{{form.name ? form.name : "--"}}</span>
|
||||||
<el-descriptions-item label="绑定信息"></el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实体卡号">{{form.idcard ? form.idcard : "--"}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="绑定信息">--</el-descriptions-item>
|
||||||
<el-descriptions-item label="会员状态">
|
<el-descriptions-item label="会员状态">
|
||||||
<dict-tag :options="dict.type.zhzt" :value="form.status"/>
|
<dict-tag :options="dict.type.zhzt" :value="form.status"/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="加油次数">{{form.consumeNum}}</el-descriptions-item>
|
<el-descriptions-item label="加油次数">{{form.consumeNum}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="加油总金额">{{form.refuelMoney}}</el-descriptions-item>
|
<el-descriptions-item label="加油总金额">{{form.refuelMoney ? form.refuelMoney : "--"}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属油站">{{ store.name }}</el-descriptions-item>
|
<el-descriptions-item label="所属油站">{{ store.name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="注册时间">{{form.createTime}}</el-descriptions-item>
|
<el-descriptions-item label="注册时间">{{form.createTime}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="关联副卡">
|
<el-descriptions-item label="关联副卡">
|
||||||
@ -41,7 +43,7 @@
|
|||||||
<el-descriptions-item label="会员等级">
|
<el-descriptions-item label="会员等级">
|
||||||
{{ grade.name }}
|
{{ grade.name }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="储值优惠"></el-descriptions-item>
|
<el-descriptions-item label="储值优惠">--</el-descriptions-item>
|
||||||
<el-descriptions-item label="每日笔数">
|
<el-descriptions-item label="每日笔数">
|
||||||
<span style="color: #00afff" @click="configuration">跟随全局总配置</span>
|
<span style="color: #00afff" @click="configuration">跟随全局总配置</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@ -49,7 +51,7 @@
|
|||||||
<span style="color: #00afff" @click="level">
|
<span style="color: #00afff" @click="level">
|
||||||
<dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/></span>
|
<dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/></span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注信息">{{ form.description }}</el-descriptions-item>
|
<el-descriptions-item label="备注信息">{{ form.description ? form.description : "--" }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -65,7 +67,7 @@
|
|||||||
<div class="sta">
|
<div class="sta">
|
||||||
<el-statistic
|
<el-statistic
|
||||||
group-separator=","
|
group-separator=","
|
||||||
:value="form.point"
|
:value="form.points"
|
||||||
title="累计积分"
|
title="累计积分"
|
||||||
></el-statistic>
|
></el-statistic>
|
||||||
</div>
|
</div>
|
||||||
@ -74,8 +76,8 @@
|
|||||||
<div class="sta">
|
<div class="sta">
|
||||||
<el-statistic
|
<el-statistic
|
||||||
group-separator=","
|
group-separator=","
|
||||||
:value="form.refuelMoney"
|
:value="form.growthValue"
|
||||||
title="加油金">
|
title="成长值">
|
||||||
</el-statistic>
|
</el-statistic>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -84,7 +86,7 @@
|
|||||||
<el-statistic
|
<el-statistic
|
||||||
group-separator=","
|
group-separator=","
|
||||||
:precision="2"
|
:precision="2"
|
||||||
:value="form.balance"
|
:value="form.cardBalance"
|
||||||
title="账户余额"
|
title="账户余额"
|
||||||
></el-statistic>
|
></el-statistic>
|
||||||
</div>
|
</div>
|
||||||
@ -94,9 +96,11 @@
|
|||||||
<el-statistic
|
<el-statistic
|
||||||
group-separator=","
|
group-separator=","
|
||||||
:precision="2"
|
:precision="2"
|
||||||
:value="form.literCard"
|
:value="form.refuelMoney"
|
||||||
title="升数卡余额"
|
title="囤油卡余额"
|
||||||
></el-statistic>
|
>
|
||||||
|
<!-- <span></span>-->
|
||||||
|
</el-statistic>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -511,12 +515,14 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 选择员工-->
|
<!-- 选择员工-->
|
||||||
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff" append-to-body>
|
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff" append-to-body>
|
||||||
<select-staff @send-data="handleDataFromChild">
|
<select-staff @send-data="handleDataFromChild">
|
||||||
|
|
||||||
</select-staff>
|
</select-staff>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 确认充值-->
|
<!-- 确认充值-->
|
||||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openConfirm" width="500px" append-to-body>
|
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openConfirm" width="500px" append-to-body>
|
||||||
<div v-if="isPay"
|
<div v-if="isPay"
|
||||||
@ -589,7 +595,24 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="openMobile = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 更换用户昵称对话框-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openName" style="margin-top: 200px" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="会员昵称" prop="name" style="width: 420px">
|
||||||
|
<el-input v-model="form.name" type="textarea" placeholder="请输入会员昵称" maxlength="30" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="openName = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -656,7 +679,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="openBindIdCard = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -771,7 +794,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="openConfig = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -799,7 +822,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="openLevel = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -873,14 +896,12 @@ export default {
|
|||||||
|
|
||||||
realyPayBills:0,
|
realyPayBills:0,
|
||||||
|
|
||||||
|
|
||||||
oilTypeList: {},
|
oilTypeList: {},
|
||||||
|
|
||||||
isPay:true,
|
isPay:true,
|
||||||
isPaySuccess:false,
|
isPaySuccess:false,
|
||||||
isQuery:true,
|
isQuery:true,
|
||||||
|
|
||||||
|
|
||||||
payList:[],
|
payList:[],
|
||||||
// 升数卡
|
// 升数卡
|
||||||
literCard:[
|
literCard:[
|
||||||
@ -907,6 +928,7 @@ export default {
|
|||||||
title:'',
|
title:'',
|
||||||
// 是否显示修改对话框
|
// 是否显示修改对话框
|
||||||
openMobile: false,
|
openMobile: false,
|
||||||
|
openName: false,
|
||||||
openRecharge: false,
|
openRecharge: false,
|
||||||
openSecondCard:false,
|
openSecondCard:false,
|
||||||
openBindIdCard:false,
|
openBindIdCard:false,
|
||||||
@ -949,6 +971,7 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
mobile: [{ required: true, message: "请输入手机号", trigger: "blur" }],
|
mobile: [{ required: true, message: "请输入手机号", trigger: "blur" }],
|
||||||
|
name: [{ required: true, message: "请输入会员昵称,内容不可为空", trigger: "blur" }],
|
||||||
type: [{ required: true, message: "请选择操作类型", trigger: "blur" }],
|
type: [{ required: true, message: "请选择操作类型", trigger: "blur" }],
|
||||||
fixingLevel: [{ required: true, message: "请选择认证信息", trigger: "blur" }],
|
fixingLevel: [{ required: true, message: "请选择认证信息", trigger: "blur" }],
|
||||||
}
|
}
|
||||||
@ -974,6 +997,11 @@ export default {
|
|||||||
this.openMobile = true;
|
this.openMobile = true;
|
||||||
this.title = '更换手机号'
|
this.title = '更换手机号'
|
||||||
},
|
},
|
||||||
|
// 更换会员昵称
|
||||||
|
changeName(){
|
||||||
|
this.openName = true;
|
||||||
|
this.title = '会员昵称'
|
||||||
|
},
|
||||||
// 副卡管理
|
// 副卡管理
|
||||||
secondCard(){
|
secondCard(){
|
||||||
this.openSecondCard = true;
|
this.openSecondCard = true;
|
||||||
@ -1162,7 +1190,6 @@ export default {
|
|||||||
confirm(flag){
|
confirm(flag){
|
||||||
this.flag = flag
|
this.flag = flag
|
||||||
|
|
||||||
|
|
||||||
if (flag ===1) {
|
if (flag ===1) {
|
||||||
if (this.cardValueForm.paymentType == '') {
|
if (this.cardValueForm.paymentType == '') {
|
||||||
this.$message.error('请选择支付方式');
|
this.$message.error('请选择支付方式');
|
||||||
@ -1452,6 +1479,7 @@ export default {
|
|||||||
updateUser(this.form).then(response => {
|
updateUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.openMobile = false;
|
this.openMobile = false;
|
||||||
|
this.openName = false;
|
||||||
this.openConfig = false;
|
this.openConfig = false;
|
||||||
this.openLevel = false;
|
this.openLevel = false;
|
||||||
this.openBindIdCard = false;
|
this.openBindIdCard = false;
|
||||||
@ -1468,10 +1496,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.openMobile = false;
|
|
||||||
this.openConfig = false;
|
|
||||||
this.openLevel = false;
|
|
||||||
this.openBindIdCard = false;
|
|
||||||
this.openRecharge = false;
|
this.openRecharge = false;
|
||||||
|
|
||||||
this.isPay = true;
|
this.isPay = true;
|
||||||
|
15
fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue
Normal file
15
fuintAdmin/src/views/member/userInfoOrder/balanceRecord.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
15
fuintAdmin/src/views/member/userInfoOrder/couponList.vue
Normal file
15
fuintAdmin/src/views/member/userInfoOrder/couponList.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
15
fuintAdmin/src/views/member/userInfoOrder/goodsOrder.vue
Normal file
15
fuintAdmin/src/views/member/userInfoOrder/goodsOrder.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
15
fuintAdmin/src/views/member/userInfoOrder/oilOrder.vue
Normal file
15
fuintAdmin/src/views/member/userInfoOrder/oilOrder.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
15
fuintAdmin/src/views/member/userInfoOrder/pointsRecord.vue
Normal file
15
fuintAdmin/src/views/member/userInfoOrder/pointsRecord.vue
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,15 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -87,8 +87,8 @@ weixin.official.appId=wxf4327ef05c27a0
|
|||||||
weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3
|
weixin.official.appSecret=1f55e8749332234d9a074873d8e6a3
|
||||||
|
|
||||||
# 小程序配置
|
# 小程序配置
|
||||||
wxpay.appId = wxb6af3741234162bc
|
wxpay.appId = wxba517a9bac38fe92
|
||||||
wxpay.appSecret = 76a538bfa5b55a4564d5f2be5540
|
wxpay.appSecret = 8bfcce86abc4e2a461ecc781a09249a5
|
||||||
wxpay.mchId=1636980812
|
wxpay.mchId=1636980812
|
||||||
wxpay.apiV2=34354320201030y323e432342343
|
wxpay.apiV2=34354320201030y323e432342343
|
||||||
wxpay.certPath=/usr/local/fuint/cert/apiclient_cert.p12
|
wxpay.certPath=/usr/local/fuint/cert/apiclient_cert.p12
|
||||||
|
@ -64,7 +64,7 @@ public class IntegralSettingsController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("getByStoreId")
|
@GetMapping("getByStoreId")
|
||||||
public ResponseObject getByStoreId(Integer id) {
|
public ResponseObject getByStoreId(Integer id) {
|
||||||
return getSuccessResult(this.integralSettingsService.queryById(id));
|
return getSuccessResult(this.integralSettingsService.getByStoreId(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +52,8 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IntegralSettings getByStoreId(Integer id) {
|
public IntegralSettings getByStoreId(Integer id) {
|
||||||
return this.integralSettingsMapper.getByStoreId(id);
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
return this.integralSettingsMapper.getByStoreId(nowAccountInfo.getStoreId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -451,6 +451,9 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
|||||||
Double beforeBalance = balance.getCardBalance();
|
Double beforeBalance = balance.getCardBalance();
|
||||||
Double afterBalance = beforeBalance - amount;
|
Double afterBalance = beforeBalance - amount;
|
||||||
balance.setCardBalance(afterBalance);
|
balance.setCardBalance(afterBalance);
|
||||||
|
// 修改加油次数
|
||||||
|
Integer consumeNum = balance.getConsumeNum();
|
||||||
|
balance.setConsumeNum(consumeNum+1);
|
||||||
userBalanceService.updateUserBalance(balance);
|
userBalanceService.updateUserBalance(balance);
|
||||||
// 添加余额记录信息
|
// 添加余额记录信息
|
||||||
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
CardBalanceChange cardBalanceChange = new CardBalanceChange();
|
||||||
|
@ -51,6 +51,16 @@ public class OilNumberController extends BaseController {
|
|||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询所有油号")
|
||||||
|
@GetMapping("getList2")
|
||||||
|
public ResponseObject selectAll2(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10000") Integer pageSize,
|
||||||
|
OilNumber oilNumber) {
|
||||||
|
Page page =new Page(pageNo,pageSize);
|
||||||
|
IPage<OilNumber> list = oilPresetPricesService.selectOilNumberList2(page,oilNumber);
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过主键查询单条数据
|
* 通过主键查询单条数据
|
||||||
*
|
*
|
||||||
|
@ -23,6 +23,7 @@ public interface OilNumberMapper extends BaseMapper<OilNumber> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||||
|
IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询员工信息
|
* 根据id查询员工信息
|
||||||
|
@ -31,6 +31,19 @@
|
|||||||
where store_id = #{oilNumber.storeId}
|
where store_id = #{oilNumber.storeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOilNumberList2" resultMap="OilNumberResult">
|
||||||
|
select
|
||||||
|
omm.number_id ,
|
||||||
|
onn.oil_type,
|
||||||
|
onn.oil_name,
|
||||||
|
omm.oil_price,
|
||||||
|
omm.gb_price
|
||||||
|
from oil_number omm
|
||||||
|
left join oil_name onn on omm.oil_name = onn.id
|
||||||
|
|
||||||
|
where omm.store_id = #{oilNumber.storeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- select-->
|
<!-- select-->
|
||||||
<!-- number_id numberId,-->
|
<!-- number_id numberId,-->
|
||||||
<!-- oil_type oilType,-->
|
<!-- oil_type oilType,-->
|
||||||
|
@ -23,6 +23,7 @@ public interface OilNumberService extends IService<OilNumber> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
public IPage<OilNumber> selectOilNumberList(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||||
|
public IPage<OilNumber> selectOilNumberList2(Page page, @Param("oilNumber") OilNumber oilNumber);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询员工信息
|
* 根据id查询员工信息
|
||||||
|
@ -33,6 +33,13 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
|
|||||||
return baseMapper.selectOilNumberList(page,oilNumber);
|
return baseMapper.selectOilNumberList(page,oilNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<OilNumber> selectOilNumberList2(Page page, OilNumber oilNumber) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
oilNumber.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return baseMapper.selectOilNumberList2(page,oilNumber);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OilNumber selectOilNumberById(int id) {
|
public OilNumber selectOilNumberById(int id) {
|
||||||
return baseMapper.selectOilNumberById(id);
|
return baseMapper.selectOilNumberById(id);
|
||||||
|
@ -38,6 +38,16 @@ public class LJStoreController extends BaseController {
|
|||||||
return getSuccessResult(list);
|
return getSuccessResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据连锁店id查询所有门店信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/stores")
|
||||||
|
public ResponseObject stores(){
|
||||||
|
List<LJStore> list = storeService.selectStoreByChainStoreId();
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改门店信息
|
* 修改门店信息
|
||||||
* @param store
|
* @param store
|
||||||
|
@ -41,6 +41,12 @@ public interface ILJStoreService extends IService<LJStore> {
|
|||||||
*/
|
*/
|
||||||
public List<LJStore> selectStoreList();
|
public List<LJStore> selectStoreList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据连锁店id查询店铺信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<LJStore> selectStoreByChainStoreId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改店铺信息
|
* 修改店铺信息
|
||||||
* @param store 店铺信息
|
* @param store 店铺信息
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.storeInformation.service.impl;
|
package com.fuint.business.storeInformation.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.storeInformation.entity.LJStore;
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
|
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
|
||||||
@ -7,6 +8,7 @@ import com.fuint.business.storeInformation.service.ILJStoreService;
|
|||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.StringUtils;
|
import com.fuint.common.util.StringUtils;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -123,6 +125,17 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
return baseMapper.selectList(null);
|
return baseMapper.selectList(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LJStore> selectStoreByChainStoreId() {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
LJStore store = this.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||||
|
Integer chainStoreId = store.getChainStoreId();
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("chain_store_id",chainStoreId);
|
||||||
|
List<LJStore> list = baseMapper.selectList(queryWrapper);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改店铺信息
|
* 修改店铺信息
|
||||||
* @param store 店铺信息
|
* @param store 店铺信息
|
||||||
|
@ -44,11 +44,11 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计信息
|
* 统计信息
|
||||||
* @param storeId
|
* @param chainStoreId
|
||||||
* @param sumValue
|
* @param sumValue
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Double selectSumByStore(@Param("storeId") int storeId,@Param("sumValue") String sumValue);
|
public Double selectSumByStore(@Param("chainStoreId") int chainStoreId,@Param("sumValue") String sumValue);
|
||||||
|
|
||||||
|
|
||||||
LJUserVo selectAllInfoById(@Param("userId") Integer userId);
|
LJUserVo selectAllInfoById(@Param("userId") Integer userId);
|
||||||
|
@ -2,20 +2,23 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.fuint.business.userManager.mapper.LJUserMapper">
|
<mapper namespace="com.fuint.business.userManager.mapper.LJUserMapper">
|
||||||
<sql id="selectUser">
|
<sql id="selectUser">
|
||||||
select mu.*,mub.card_balance,mub.points,mub.growth_value,mub.refuel_money,mub.grade_id,mub.consume_num,
|
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.second_card,mub.fixing_level,
|
||||||
mub.second_card,mub.fixing_level
|
mi.storeId,mi.staffId,mi.inviterId,mi.chain_store_id from mt_user mu
|
||||||
from mt_user mu
|
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
left join mt_invitation mi on mu.id = mi.userId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
<select id="selectUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||||
<include refid="selectUser"></include>
|
<include refid="selectUser"></include>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||||
|
and mi.chain_store_id = #{user.chainStoreId}
|
||||||
|
</if>
|
||||||
<if test="user.storeId != null and user.storeId != ''">
|
<if test="user.storeId != null and user.storeId != ''">
|
||||||
and mu.store_id = #{user.storeId}
|
and mi.storeId = #{user.storeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="user.storeId == 0">
|
<if test="user.storeId == 0">
|
||||||
and mu.store_id = #{user.storeId}
|
and mi.storeId = #{user.storeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="user.mobile != null and user.mobile != ''">
|
<if test="user.mobile != null and user.mobile != ''">
|
||||||
and mu.mobile like concat('%', #{user.mobile}, '%')
|
and mu.mobile like concat('%', #{user.mobile}, '%')
|
||||||
@ -48,7 +51,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<!-- 查询会员统计信息-->
|
<!-- 查询会员统计信息-->
|
||||||
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
|
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
|
||||||
select sum(${sumValue}) from mt_user_balance where store_id = #{storeId}
|
select sum(${sumValue}) from mt_user_balance where chain_store_id = #{chainStoreId}
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据手机号查询会员信息-->
|
<!-- 根据手机号查询会员信息-->
|
||||||
<select id="selectUserByMobile" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
<select id="selectUserByMobile" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||||
|
@ -33,6 +33,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
private CertifiedMemberMapper certifiedMemberMapper;
|
private CertifiedMemberMapper certifiedMemberMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserBalanceService balanceService;
|
private UserBalanceService balanceService;
|
||||||
|
@Autowired
|
||||||
|
private ILJStoreService storeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询会员信息
|
* 根据条件分页查询会员信息
|
||||||
@ -72,8 +74,10 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
Map<String ,Object> map = new HashMap<>();
|
Map<String ,Object> map = new HashMap<>();
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
Double balance = baseMapper.selectSumByStore(storeId, "card_balance");
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
Double point = baseMapper.selectSumByStore(storeId, "points");
|
Integer chainStoreId = store.getChainStoreId();
|
||||||
|
Double balance = baseMapper.selectSumByStore(chainStoreId, "card_balance");
|
||||||
|
Double point = baseMapper.selectSumByStore(chainStoreId, "points");
|
||||||
// Double literCard = baseMapper.selectSumByStore(storeId, "liter_card");
|
// Double literCard = baseMapper.selectSumByStore(storeId, "liter_card");
|
||||||
// Double refuelMoney = baseMapper.selectSumByStore(storeId, "refuel_money");
|
// Double refuelMoney = baseMapper.selectSumByStore(storeId, "refuel_money");
|
||||||
|
|
||||||
@ -149,8 +153,6 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
balanceService.deleteUserBalanceByUserId(id);
|
balanceService.deleteUserBalanceByUserId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ILJStoreService storeService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MtInvitationMapper invitationMapper;
|
private MtInvitationMapper invitationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -243,6 +245,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
invitation.setStoreId(storeId);
|
invitation.setStoreId(storeId);
|
||||||
invitation.setStaffId(nowAccountInfo.getStaffId());
|
invitation.setStaffId(nowAccountInfo.getStaffId());
|
||||||
invitation.setChainStoreId(chainStoreId);
|
invitation.setChainStoreId(chainStoreId);
|
||||||
|
invitation.setStatus("qy");
|
||||||
invitationMapper.insert(invitation);
|
invitationMapper.insert(invitation);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
@ -255,9 +258,11 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
@Override
|
@Override
|
||||||
public int updateUser(LJUserVo userVo) {
|
public int updateUser(LJUserVo userVo) {
|
||||||
LJUser user = new LJUser();
|
LJUser user = new LJUser();
|
||||||
|
user.setId(userVo.getId());
|
||||||
user.setUserNo(userVo.getUserNo());
|
user.setUserNo(userVo.getUserNo());
|
||||||
user.setAvatar(userVo.getAvatar());
|
user.setAvatar(userVo.getAvatar());
|
||||||
user.setName(userVo.getName());
|
user.setName(userVo.getName());
|
||||||
|
user.setPhysicalCard(userVo.getPhysicalCard());
|
||||||
user.setOpenId(userVo.getOpenId());
|
user.setOpenId(userVo.getOpenId());
|
||||||
user.setMobile(userVo.getMobile());
|
user.setMobile(userVo.getMobile());
|
||||||
user.setIdcard(userVo.getIdcard());
|
user.setIdcard(userVo.getIdcard());
|
||||||
|
@ -43,27 +43,10 @@ public class LJUserVo extends BaseEntity {
|
|||||||
@ExcelProperty(value = "证件号码")
|
@ExcelProperty(value = "证件号码")
|
||||||
private String idcard;
|
private String idcard;
|
||||||
|
|
||||||
// 等级ID
|
|
||||||
private Integer gradeId;
|
|
||||||
|
|
||||||
// 性别 1男,0女
|
// 性别 1男,0女
|
||||||
@ExcelProperty(value = "性别",converter = GenderConverter.class)
|
@ExcelProperty(value = "性别",converter = GenderConverter.class)
|
||||||
private Integer sex;
|
private Integer sex;
|
||||||
|
|
||||||
// 储值卡
|
|
||||||
@ExcelProperty(value = "储值卡余额")
|
|
||||||
private Double cardBalance;
|
|
||||||
|
|
||||||
// 积分
|
|
||||||
@ExcelProperty(value = "积分余额")
|
|
||||||
private Integer points;
|
|
||||||
|
|
||||||
// 成长值
|
|
||||||
private Integer growthValue;
|
|
||||||
|
|
||||||
// 油量
|
|
||||||
private String refuelMoney;
|
|
||||||
|
|
||||||
// 出生日期
|
// 出生日期
|
||||||
private String birthday;
|
private String birthday;
|
||||||
|
|
||||||
@ -84,6 +67,23 @@ public class LJUserVo extends BaseEntity {
|
|||||||
// 公众号
|
// 公众号
|
||||||
private String official;
|
private String official;
|
||||||
|
|
||||||
|
// 等级ID
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
// 储值卡
|
||||||
|
@ExcelProperty(value = "储值卡余额")
|
||||||
|
private Double cardBalance;
|
||||||
|
|
||||||
|
// 积分
|
||||||
|
@ExcelProperty(value = "积分余额")
|
||||||
|
private Integer points;
|
||||||
|
|
||||||
|
// 成长值
|
||||||
|
private Integer growthValue;
|
||||||
|
|
||||||
|
// 油量
|
||||||
|
private String refuelMoney;
|
||||||
|
|
||||||
// 加油次数
|
// 加油次数
|
||||||
private Integer consumeNum;
|
private Integer consumeNum;
|
||||||
|
|
||||||
@ -95,17 +95,17 @@ public class LJUserVo extends BaseEntity {
|
|||||||
private String fixingLevel;
|
private String fixingLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺id
|
* 店铺Id
|
||||||
*/
|
*/
|
||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
/**
|
/**
|
||||||
* 员工id
|
* 员工id
|
||||||
*/
|
*/
|
||||||
private Integer staffid;
|
private Integer staffId;
|
||||||
/**
|
/**
|
||||||
* 邀请人id
|
* 邀请人id
|
||||||
*/
|
*/
|
||||||
private Integer inviterid;
|
private Integer inviterId;
|
||||||
/**
|
/**
|
||||||
* 连锁店id
|
* 连锁店id
|
||||||
*/
|
*/
|
||||||
|
@ -13,8 +13,10 @@ import com.fuint.business.userManager.entity.MtInvitation;
|
|||||||
import com.fuint.business.userManager.entity.UserBalance;
|
import com.fuint.business.userManager.entity.UserBalance;
|
||||||
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
||||||
import com.fuint.business.userManager.mapper.UserBalanceMapper;
|
import com.fuint.business.userManager.mapper.UserBalanceMapper;
|
||||||
|
import com.fuint.business.userManager.service.LJUserService;
|
||||||
import com.fuint.business.userManager.service.MtInvitationService;
|
import com.fuint.business.userManager.service.MtInvitationService;
|
||||||
import com.fuint.business.userManager.service.UserBalanceService;
|
import com.fuint.business.userManager.service.UserBalanceService;
|
||||||
|
import com.fuint.business.userManager.vo.LJUserVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.dto.MemberTopDto;
|
import com.fuint.common.dto.MemberTopDto;
|
||||||
import com.fuint.common.dto.UserDto;
|
import com.fuint.common.dto.UserDto;
|
||||||
@ -725,14 +727,15 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private UserBalanceService userBalanceService;
|
private UserBalanceService userBalanceService;
|
||||||
@Autowired
|
@Resource
|
||||||
private ILJStoreService iljStoreService;
|
private ILJStoreService iljStoreService;
|
||||||
|
@Resource
|
||||||
|
LJUserService ljUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MtUser queryMemberByOpenId2(String openId, JSONObject userInfo) throws BusinessCheckException {
|
public MtUser queryMemberByOpenId2(String openId, JSONObject userInfo) throws BusinessCheckException {
|
||||||
// merchantId 可以不需要
|
// merchantId 可以不需要
|
||||||
MtUser user = mtUserMapper.queryMemberByOpenId2(openId);
|
// MtUser user = mtUserMapper.queryMemberByOpenId2(openId);
|
||||||
|
|
||||||
String avatar = Optional.ofNullable(userInfo.getString("avatarUrl")).orElse("");
|
String avatar = Optional.ofNullable(userInfo.getString("avatarUrl")).orElse("");
|
||||||
String gender = StringUtil.isNotEmpty(userInfo.getString("gender")) ? userInfo.getString("gender") : GenderEnum.MAN.getKey().toString();
|
String gender = StringUtil.isNotEmpty(userInfo.getString("gender")) ? userInfo.getString("gender") : GenderEnum.MAN.getKey().toString();
|
||||||
@ -747,130 +750,249 @@ public class MemberServiceImpl extends ServiceImpl<MtUserMapper, MtUser> impleme
|
|||||||
String source = StringUtil.isNotEmpty(userInfo.getString("source")) ? userInfo.getString("source") : MemberSourceEnum.WECHAT_LOGIN.getKey();
|
String source = StringUtil.isNotEmpty(userInfo.getString("source")) ? userInfo.getString("source") : MemberSourceEnum.WECHAT_LOGIN.getKey();
|
||||||
|
|
||||||
|
|
||||||
|
// 根绝手机号查询是否有该用户 没有则新建 有就更新
|
||||||
// openid没有时,使用手机号
|
if (ObjectUtil.isNotEmpty(mobile) || "".equals(mobile)) {
|
||||||
if (user == null) {
|
MtUser mtUserMobile = queryMemberByMobile2(mobile);
|
||||||
MtUser mtUser = new MtUser();
|
MtUser mtUser = new MtUser();
|
||||||
if (StringUtil.isNotEmpty(mobile)) {
|
|
||||||
MtUser mtUserMobile = queryMemberByMobile2(mobile);
|
if (ObjectUtil.isEmpty(mtUserMobile)) {
|
||||||
if (mtUserMobile != null) {
|
// 新增
|
||||||
mtUser = mtUserMobile;
|
// LJUserVo userVo = new LJUserVo();
|
||||||
|
mtUser.setOpenId(openId);
|
||||||
|
|
||||||
|
mtUser.setMobile(mobile);
|
||||||
|
mtUser.setCreateTime(new Date());
|
||||||
|
mtUser.setUpdateTime(new Date());
|
||||||
|
mtUser.setDescription("微信登录自动注册");
|
||||||
|
mtUser.setStatus("qy");
|
||||||
|
mtUser.setSex(Integer.parseInt(gender));
|
||||||
|
mtUser.setUserNo(editUserNo());
|
||||||
|
// 微信用户 1:男;2:女 0:未知
|
||||||
|
if (gender.equals(GenderEnum.FEMALE.getKey().toString())) {
|
||||||
|
gender = GenderEnum.UNKNOWN.getKey().toString();
|
||||||
|
} else if (gender.equals(GenderEnum.UNKNOWN.getKey().toString())) {
|
||||||
|
gender = GenderEnum.FEMALE.getKey().toString();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// 昵称为空,用手机号
|
|
||||||
if (StringUtil.isEmpty(nickName) && StringUtil.isNotEmpty(mobile)) {
|
|
||||||
nickName = mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
|
|
||||||
}
|
|
||||||
String userNo = CommonUtil.createUserNo();
|
|
||||||
mobile = CommonUtil.replaceXSS(mobile);
|
|
||||||
avatar = CommonUtil.replaceXSS(avatar);
|
|
||||||
nickName = CommonUtil.replaceXSS(nickName);
|
|
||||||
mtUser.setUserNo(userNo);
|
|
||||||
mtUser.setMobile(mobile);
|
|
||||||
mtUser.setAvatar(avatar);
|
|
||||||
mtUser.setName(nickName);
|
|
||||||
mtUser.setOpenId(openId);
|
|
||||||
// MtUserGrade grade = userGradeService.getInitUserGrade(merchantId);
|
|
||||||
// if (grade != null) {
|
|
||||||
// mtUser.setGradeId(grade.getId() + "");
|
|
||||||
// }
|
|
||||||
Date time = new Date();
|
|
||||||
mtUser.setCreateTime(time);
|
|
||||||
mtUser.setUpdateTime(time);
|
|
||||||
mtUser.setBalance(new BigDecimal(0));
|
|
||||||
mtUser.setPoint(0);
|
|
||||||
mtUser.setDescription("微信登录自动注册");
|
|
||||||
mtUser.setIdcard("");
|
|
||||||
mtUser.setStatus("qy");
|
|
||||||
mtUser.setAddress(country + province + city);
|
|
||||||
// 微信用户 1:男;2:女 0:未知
|
|
||||||
if (gender.equals(GenderEnum.FEMALE.getKey().toString())) {
|
|
||||||
gender = GenderEnum.UNKNOWN.getKey().toString();
|
|
||||||
} else if (gender.equals(GenderEnum.UNKNOWN.getKey().toString())) {
|
|
||||||
gender = GenderEnum.FEMALE.getKey().toString();
|
|
||||||
}
|
|
||||||
mtUser.setSex(Integer.parseInt(gender));
|
|
||||||
if (StringUtil.isNotEmpty(storeId)) {
|
|
||||||
mtUser.setStoreId(Integer.parseInt(storeId));
|
|
||||||
} else {
|
|
||||||
mtUser.setStoreId(0);
|
|
||||||
}
|
|
||||||
mtUser.setSource(source);
|
|
||||||
mtUser.setCreateTime(new Date());
|
|
||||||
mtUser.setUpdateTime(new Date());
|
|
||||||
if (mtUser.getId() == null || mtUser.getId() <= 0) {
|
|
||||||
save(mtUser);
|
save(mtUser);
|
||||||
} else {
|
|
||||||
updateById(mtUser);
|
|
||||||
}
|
|
||||||
|
|
||||||
user = mtUserMapper.queryMemberByOpenId2(openId);
|
// 新增余额信息
|
||||||
|
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||||
|
// 根据userid和stortId查询是否存在对应的余额信息
|
||||||
|
UserBalance userBalance = userBalanceService.selectUserBalance(mtUserMobile.getId(), Integer.parseInt(storeId));
|
||||||
|
if (ObjectUtil.isEmpty(userBalance)) {
|
||||||
|
// 新增余额信息
|
||||||
|
UserBalance userBalanceAdd = new UserBalance();
|
||||||
|
userBalanceAdd.setMtUserId(mtUserMobile.getId());
|
||||||
|
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
|
||||||
|
userBalanceAdd.setCardBalance(0.0);
|
||||||
|
userBalanceAdd.setPoints(0);
|
||||||
|
userBalanceAdd.setGrowthValue(0);
|
||||||
|
userBalanceAdd.setConsumeNum(0);
|
||||||
|
|
||||||
// 新增余额信息
|
MtUserGrade lowGrade = userGradeService.getLowGrade(Integer.parseInt(storeId));
|
||||||
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
if (ObjectUtil.isNotEmpty(lowGrade) && ObjectUtil.isNotEmpty(lowGrade.getId())) {
|
||||||
// 根据userid和stortId查询是否存在对应的余额信息
|
userBalanceAdd.setGradeId(lowGrade.getId());
|
||||||
UserBalance userBalance = userBalanceService.selectUserBalance(user.getId(), Integer.parseInt(storeId));
|
}
|
||||||
if (ObjectUtil.isEmpty(userBalance)) {
|
// 新增会员余额信息
|
||||||
// 新增余额信息
|
userBalanceService.insertUserBalance(userBalanceAdd);
|
||||||
UserBalance userBalanceAdd = new UserBalance();
|
}
|
||||||
userBalanceAdd.setMtUserId(user.getId());
|
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
|
||||||
userBalanceAdd.setStoreId(Integer.parseInt(storeId));
|
// 查询关联表里面是否有信息
|
||||||
userBalanceAdd.setCardBalance(0.0);
|
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUserMobile.getId());
|
||||||
userBalanceAdd.setPoints(0);
|
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||||
userBalanceAdd.setGrowthValue(0);
|
MtInvitation mtInvitation = new MtInvitation();
|
||||||
userBalanceAdd.setConsumeNum(0);
|
mtInvitation.setUserId(mtUserMobile.getId());
|
||||||
|
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||||
MtUserGrade lowGrade = userGradeService.getLowGrade(Integer.parseInt(storeId));
|
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
|
||||||
if (ObjectUtil.isNotEmpty(lowGrade) && ObjectUtil.isNotEmpty(lowGrade.getId())) {
|
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||||
userBalanceAdd.setGradeId(lowGrade.getId());
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
|
||||||
|
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!ObjectUtil.isEmpty(store)){
|
||||||
|
mtInvitation.setChainStoreId(store.getChainStoreId());
|
||||||
|
}
|
||||||
|
mtInvitationMapper.insert(mtInvitation);
|
||||||
}
|
}
|
||||||
// 新增会员余额信息
|
|
||||||
userBalanceService.insertUserBalance(userBalanceAdd);
|
|
||||||
}
|
}
|
||||||
LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
|
return mtUser;
|
||||||
// 查询关联表里面是否有信息
|
|
||||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
}else {
|
||||||
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
// 已被禁用
|
||||||
MtInvitation mtInvitation = new MtInvitation();
|
if (!"qy".equals(mtUserMobile.getStatus())) {
|
||||||
mtInvitation.setUserId(user.getId());
|
return null;
|
||||||
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
}
|
||||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
// 修改
|
||||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
mtUserMobile.setOpenId(openId);
|
||||||
if (!ObjectUtil.isEmpty(store)){
|
|
||||||
mtInvitation.setChainStoreId(store.getChainStoreId());
|
updateById(mtUserMobile);
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||||
|
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), mtUserMobile.getId());
|
||||||
|
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||||
|
MtInvitation mtInvitation = new MtInvitation();
|
||||||
|
mtInvitation.setUserId(mtUserMobile.getId());
|
||||||
|
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||||
|
if (ObjectUtil.isNotEmpty(staffId) && staffId !="") {
|
||||||
|
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(inviterId) && inviterId !="") {
|
||||||
|
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mtInvitationMapper.insert(mtInvitation);
|
||||||
}
|
}
|
||||||
mtInvitationMapper.insert(mtInvitation);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return mtUserMobile;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 已被禁用
|
// 使用openId查询
|
||||||
if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// 补充手机号
|
|
||||||
if (StringUtil.isNotEmpty(mobile)) {
|
|
||||||
user.setMobile(mobile);
|
|
||||||
updateById(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
|
||||||
MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
|
||||||
if (ObjectUtil.isEmpty(mtInvitation1)) {
|
|
||||||
MtInvitation mtInvitation = new MtInvitation();
|
|
||||||
mtInvitation.setUserId(user.getId());
|
|
||||||
mtInvitation.setStoreId(Integer.parseInt(storeId));
|
|
||||||
mtInvitation.setStaffId(Integer.parseInt(staffId));
|
|
||||||
mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
|
||||||
mtInvitationMapper.insert(mtInvitation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return user;
|
|
||||||
|
// // openid没有时,使用手机号
|
||||||
|
// if (user == null) {
|
||||||
|
// MtUser mtUser = new MtUser();
|
||||||
|
// if (StringUtil.isNotEmpty(mobile)) {
|
||||||
|
// MtUser mtUserMobile = queryMemberByMobile2(mobile);
|
||||||
|
// if (mtUserMobile != null) {
|
||||||
|
// mtUser = mtUserMobile;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// // 昵称为空,用手机号
|
||||||
|
// if (StringUtil.isEmpty(nickName) && StringUtil.isNotEmpty(mobile)) {
|
||||||
|
// nickName = mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
|
||||||
|
// }
|
||||||
|
// String userNo = CommonUtil.createUserNo();
|
||||||
|
// mobile = CommonUtil.replaceXSS(mobile);
|
||||||
|
// avatar = CommonUtil.replaceXSS(avatar);
|
||||||
|
// nickName = CommonUtil.replaceXSS(nickName);
|
||||||
|
// mtUser.setUserNo(userNo);
|
||||||
|
// mtUser.setMobile(mobile);
|
||||||
|
// mtUser.setAvatar(avatar);
|
||||||
|
// mtUser.setName(nickName);
|
||||||
|
// mtUser.setOpenId(openId);
|
||||||
|
//
|
||||||
|
// Date time = new Date();
|
||||||
|
// mtUser.setCreateTime(time);
|
||||||
|
// mtUser.setUpdateTime(time);
|
||||||
|
// mtUser.setBalance(new BigDecimal(0));
|
||||||
|
// mtUser.setPoint(0);
|
||||||
|
// mtUser.setDescription("微信登录自动注册");
|
||||||
|
// mtUser.setIdcard("");
|
||||||
|
// mtUser.setStatus("qy");
|
||||||
|
// // 微信用户 1:男;2:女 0:未知
|
||||||
|
// if (gender.equals(GenderEnum.FEMALE.getKey().toString())) {
|
||||||
|
// gender = GenderEnum.UNKNOWN.getKey().toString();
|
||||||
|
// } else if (gender.equals(GenderEnum.UNKNOWN.getKey().toString())) {
|
||||||
|
// gender = GenderEnum.FEMALE.getKey().toString();
|
||||||
|
// }
|
||||||
|
// mtUser.setSex(Integer.parseInt(gender));
|
||||||
|
//
|
||||||
|
// mtUser.setSource(source);
|
||||||
|
// if (mtUser.getId() == null || mtUser.getId() <= 0) {
|
||||||
|
// save(mtUser);
|
||||||
|
// } else {
|
||||||
|
// updateById(mtUser);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// user = mtUserMapper.queryMemberByOpenId2(openId);
|
||||||
|
//
|
||||||
|
// // 新增余额信息
|
||||||
|
// if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||||
|
// // 根据userid和stortId查询是否存在对应的余额信息
|
||||||
|
// UserBalance userBalance = userBalanceService.selectUserBalance(user.getId(), Integer.parseInt(storeId));
|
||||||
|
// if (ObjectUtil.isEmpty(userBalance)) {
|
||||||
|
// // 新增余额信息
|
||||||
|
// UserBalance userBalanceAdd = new UserBalance();
|
||||||
|
// userBalanceAdd.setMtUserId(user.getId());
|
||||||
|
// userBalanceAdd.setStoreId(Integer.parseInt(storeId));
|
||||||
|
// userBalanceAdd.setCardBalance(0.0);
|
||||||
|
// userBalanceAdd.setPoints(0);
|
||||||
|
// userBalanceAdd.setGrowthValue(0);
|
||||||
|
// userBalanceAdd.setConsumeNum(0);
|
||||||
|
//
|
||||||
|
// MtUserGrade lowGrade = userGradeService.getLowGrade(Integer.parseInt(storeId));
|
||||||
|
// if (ObjectUtil.isNotEmpty(lowGrade) && ObjectUtil.isNotEmpty(lowGrade.getId())) {
|
||||||
|
// userBalanceAdd.setGradeId(lowGrade.getId());
|
||||||
|
// }
|
||||||
|
// // 新增会员余额信息
|
||||||
|
// userBalanceService.insertUserBalance(userBalanceAdd);
|
||||||
|
// }
|
||||||
|
// LJStore store = iljStoreService.selectStoreByStoreId(Integer.parseInt(storeId));
|
||||||
|
// // 查询关联表里面是否有信息
|
||||||
|
// MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
||||||
|
// if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||||
|
// MtInvitation mtInvitation = new MtInvitation();
|
||||||
|
// mtInvitation.setUserId(user.getId());
|
||||||
|
// mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||||
|
// mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||||
|
// mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||||
|
// if (!ObjectUtil.isEmpty(store)){
|
||||||
|
// mtInvitation.setChainStoreId(store.getChainStoreId());
|
||||||
|
// }
|
||||||
|
// mtInvitationMapper.insert(mtInvitation);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// // 已被禁用
|
||||||
|
// if (user.getStatus().equals(StatusEnum.DISABLE.getKey())) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// // 补充手机号
|
||||||
|
// if (StringUtil.isNotEmpty(mobile)) {
|
||||||
|
// user.setMobile(mobile);
|
||||||
|
// updateById(user);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (ObjectUtil.isNotEmpty(storeId) && storeId !="") {
|
||||||
|
// MtInvitation mtInvitation1 = mtInvitationMapper.queryByStoreId(Integer.parseInt(storeId), user.getId());
|
||||||
|
// if (ObjectUtil.isEmpty(mtInvitation1)) {
|
||||||
|
// MtInvitation mtInvitation = new MtInvitation();
|
||||||
|
// mtInvitation.setUserId(user.getId());
|
||||||
|
// mtInvitation.setStoreId(Integer.parseInt(storeId));
|
||||||
|
// mtInvitation.setStaffId(Integer.parseInt(staffId));
|
||||||
|
// mtInvitation.setInviterId(Integer.parseInt(inviterId));
|
||||||
|
// mtInvitationMapper.insert(mtInvitation);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//生成用户编号
|
||||||
|
private String editUserNo() {
|
||||||
|
Random random = new Random();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
sb.append(random.nextInt(10));
|
||||||
|
}
|
||||||
|
String digits = sb.toString();
|
||||||
|
|
||||||
|
int sum = 0;
|
||||||
|
for (int i = 0; i < digits.length(); i++) {
|
||||||
|
int digit = Integer.parseInt(String.valueOf(digits.charAt(i)));
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
sum += digit;
|
||||||
|
} else {
|
||||||
|
sum += digit * 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int checksum = (10 - (sum % 10)) % 10;
|
||||||
|
|
||||||
|
String number = digits + checksum;
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,66 +106,32 @@ public class ClientSignController extends BaseController {
|
|||||||
logger.info("微信授权登录参数:{}", param);
|
logger.info("微信授权登录参数:{}", param);
|
||||||
JSONObject userInfo = paramsObj.getJSONObject("userInfo");
|
JSONObject userInfo = paramsObj.getJSONObject("userInfo");
|
||||||
String storeId = ObjectUtil.isEmpty(userInfo.get("storeId"))? "" : userInfo.get("storeId").toString();
|
String storeId = ObjectUtil.isEmpty(userInfo.get("storeId"))? "" : userInfo.get("storeId").toString();
|
||||||
String staffId = ObjectUtil.isEmpty(userInfo.get("staffId"))? "" : userInfo.get("staffId").toString();
|
// String staffId = ObjectUtil.isEmpty(userInfo.get("staffId"))? "" : userInfo.get("staffId").toString();
|
||||||
String inviterId = ObjectUtil.isEmpty(userInfo.get("inviterId"))? "" : userInfo.get("inviterId").toString();
|
// String inviterId = ObjectUtil.isEmpty(userInfo.get("inviterId"))? "" : userInfo.get("inviterId").toString();
|
||||||
JSONObject loginInfo = weixinService.getWxProfile2(param.get("code").toString()); // 发起的登录请求 merchantId(用来获取商户的appid 目前用不到)
|
JSONObject loginInfo = weixinService.getWxProfile2(param.get("code").toString()); // 发起的登录请求 merchantId(用来获取商户的appid 目前用不到)
|
||||||
if (loginInfo == null) {
|
if (loginInfo == null) {
|
||||||
return getFailureResult(0, "微信登录失败");
|
return getFailureResult(0, "微信登录失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取用户信息
|
|
||||||
// String type = userInfo.getString("type");
|
|
||||||
// type.equals("phone") &&
|
|
||||||
// String encryptedData = userInfo.getString("encryptedData");
|
|
||||||
// userInfo.put("phone", "");
|
|
||||||
// userInfo.put("source", MemberSourceEnum.WECHAT_LOGIN.getKey());
|
|
||||||
// if (StringUtil.isNotEmpty(encryptedData)) {
|
|
||||||
// String phone = weixinService.getPhoneNumber(userInfo.get("encryptedData").toString(), loginInfo.get("session_key").toString(), userInfo.get("iv").toString());
|
|
||||||
// userInfo.put("phone", phone);
|
|
||||||
// }
|
|
||||||
// 默认店铺(主页) ()
|
|
||||||
// if (storeId == null || StringUtil.isEmpty(storeId)) {
|
|
||||||
// MtStore mtStore = storeService.getDefaultStore(merchantNo);
|
|
||||||
// if (mtStore != null) {
|
|
||||||
// storeId = mtStore.getId().toString();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
MtUser mtUser = memberService.queryMemberByOpenId2(loginInfo.get("openid").toString(), userInfo);
|
MtUser mtUser = memberService.queryMemberByOpenId2(loginInfo.get("openid").toString(), userInfo);
|
||||||
if (mtUser == null) {
|
if (mtUser == null) {
|
||||||
return getFailureResult(0, "用户状态异常");
|
return getFailureResult(0, "用户状态异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
String userAgent = request.getHeader("user-agent");
|
String userAgent = request.getHeader("user-agent");
|
||||||
// String token = TokenUtil.generateToken(userAgent, mtUser.getId());
|
|
||||||
// UserInfo userLoginInfo = new UserInfo();
|
|
||||||
// userLoginInfo.setId(mtUser.getId());
|
|
||||||
// userLoginInfo.setStoreId(storeId);
|
|
||||||
//
|
|
||||||
// userLoginInfo.setToken(token);
|
|
||||||
// TokenUtil.saveToken(userLoginInfo);
|
|
||||||
//
|
|
||||||
// Map<String, Object> result = new HashMap<>();
|
|
||||||
// result.put("token", token);
|
|
||||||
// result.put("userId", mtUser.getId());
|
|
||||||
// result.put("userName", mtUser.getName());
|
|
||||||
// result.put("openId", mtUser.getOpenId());
|
|
||||||
|
|
||||||
AccountInfo accountInfo = new AccountInfo();
|
AccountInfo accountInfo = new AccountInfo();
|
||||||
accountInfo.setId(mtUser.getId());
|
accountInfo.setId(mtUser.getId());
|
||||||
accountInfo.setDeptId(-1L);
|
accountInfo.setDeptId(-1L);
|
||||||
if (ObjectUtil.isNotEmpty(storeId) && storeId!= "") {
|
if (ObjectUtil.isNotEmpty(storeId) && storeId!= "") {
|
||||||
accountInfo.setStoreId(Integer.parseInt(storeId));
|
accountInfo.setStoreId(Integer.parseInt(storeId));
|
||||||
}
|
}
|
||||||
String token1 = TokenUtil.generateToken(userAgent, mtUser.getId());
|
String token = TokenUtil.generateToken(userAgent, mtUser.getId());
|
||||||
accountInfo.setToken(token1);
|
accountInfo.setToken(token);
|
||||||
TokenUtil.saveAccountToken(accountInfo);
|
TokenUtil.saveAccountToken(accountInfo);
|
||||||
LoginResponse response = new LoginResponse();
|
LoginResponse response = new LoginResponse();
|
||||||
response.setLogin(true);
|
response.setLogin(true);
|
||||||
response.setToken(token1);
|
response.setToken(token);
|
||||||
response.setTokenCreatedTime(new Date());
|
response.setTokenCreatedTime(new Date());
|
||||||
// return getSuccessResult(response);
|
|
||||||
|
|
||||||
|
|
||||||
return getSuccessResult("登录成功", response);
|
return getSuccessResult("登录成功", response);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@
|
|||||||
<!-- <!–关联会员对话框 end–>-->
|
<!-- <!–关联会员对话框 end–>-->
|
||||||
|
|
||||||
<!-- <!–结算对话框 start–>-->
|
<!-- <!–结算对话框 start–>-->
|
||||||
<!-- <settlementDialog :show-dialog="openSettlementDialog" :memberInfo="memberInfo" :totalPrice="cartTotalPrice" :remarks="cartRemark" :orderInfo="orderInfo" :couponList="couponList" @submit="submitSettlement" @switchMember="switchMember" @closeDialog="closeDialog"/>-->
|
<!-- <settlementDialog :show-dialog="openSettlementDialog" :memberInfo="memberInfo" :totalPrice="cartTotalPrice" :remarks="cartRemark" :orderInfo="orderInfo" :couponList.vue="couponList.vue" @submit="submitSettlement" @switchMember="switchMember" @closeDialog="closeDialog"/>-->
|
||||||
<!-- <!–结算对话框 end–>-->
|
<!-- <!–结算对话框 end–>-->
|
||||||
|
|
||||||
<!-- <!–扫码付款对话框 start–>-->
|
<!-- <!–扫码付款对话框 start–>-->
|
||||||
|
16
gasStation-uni/.hbuilderx/launch.json
Normal file
16
gasStation-uni/.hbuilderx/launch.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||||
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
|
"version": "0.0",
|
||||||
|
"configurations": [{
|
||||||
|
"default" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"mp-weixin" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -34,6 +34,13 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "activeIn/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "你建的",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "Address/Address",
|
"path": "Address/Address",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -49,18 +49,18 @@
|
|||||||
<view class="conttainer-title">今日会员价</view>
|
<view class="conttainer-title">今日会员价</view>
|
||||||
<view class="conttainer-box">
|
<view class="conttainer-box">
|
||||||
<view class="c-box-box1" @click="show = true">
|
<view class="c-box-box1" @click="show = true">
|
||||||
<view class="">92#</view>
|
<view class="">{{oilInfo.oilName}}</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-down-fill"></u-icon>
|
<u-icon name="arrow-down-fill"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="c-box-box2">
|
<view class="c-box-box2">
|
||||||
<view class="xred">会员价</view>
|
<view class="xred">会员价</view>
|
||||||
<view class="dred"> <text class="xred">¥</text> 6.55</view>
|
<view class="dred"> <text class="xred">¥</text> {{oilInfo.oilPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="c-box-box3">
|
<view class="c-box-box3">
|
||||||
<view class="xblck">国际价</view>
|
<view class="xblck">国际价</view>
|
||||||
<view class="dblck"> <text class="xblck">¥</text> 6.55</view>
|
<view class="dblck"> <text class="xblck">¥</text> {{oilInfo.oilPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -105,7 +105,9 @@
|
|||||||
<view style="height: 88px; width: 100%;"></view>
|
<view style="height: 88px; width: 100%;"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 加油站卡片结束-->
|
<!-- 加油站卡片结束-->
|
||||||
<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" keyName="label"></u-picker>
|
||||||
|
|
||||||
<!--外层结束 -->
|
<!--外层结束 -->
|
||||||
<tabbar :msg="msg"></tabbar>
|
<tabbar :msg="msg"></tabbar>
|
||||||
</view>
|
</view>
|
||||||
@ -115,16 +117,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import tabbar from "../../components/tabbar/tabbar.vue"
|
import tabbar from "../../components/tabbar/tabbar.vue"
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
msg: "1",
|
msg: "1",
|
||||||
show: false,
|
show: false,
|
||||||
title: '',
|
title: '',
|
||||||
|
oilTypeList: '',
|
||||||
columns: [
|
columns: [
|
||||||
['#92', '#95', '#98']
|
|
||||||
],
|
],
|
||||||
|
oilInfo: {
|
||||||
|
oilName:'未添加',
|
||||||
|
oilPrice:'0',
|
||||||
|
gbPrice:'0'
|
||||||
|
},
|
||||||
|
|
||||||
list3: [
|
list3: [
|
||||||
'http://47.95.206.185:83/topbj.png',
|
'http://47.95.206.185:83/topbj.png',
|
||||||
'http://47.95.206.185:83/centerbj.png',
|
'http://47.95.206.185:83/centerbj.png',
|
||||||
@ -164,6 +174,7 @@
|
|||||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||||
}
|
}
|
||||||
this.isExistStoreId();
|
this.isExistStoreId();
|
||||||
|
this.getOilType();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.isExistStoreId();
|
this.isExistStoreId();
|
||||||
@ -242,8 +253,44 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取油站的油号信息
|
||||||
|
getOilType() {
|
||||||
|
request({
|
||||||
|
url: 'business/petrolStationManagement/oilNumber/getList2',
|
||||||
|
method: 'get',
|
||||||
|
// params:{}
|
||||||
|
}).then((res)=>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.oilTypeList = res.data.records
|
||||||
|
console.log("aaabbb",this.oilTypeList)
|
||||||
|
if (this.oilTypeList.length > 0) {
|
||||||
|
this.oilInfo.oilName = this.oilTypeList[0].oilName,
|
||||||
|
this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice,
|
||||||
|
this.oilInfo.gbPrice = this.oilTypeList[0].gbPrice
|
||||||
|
}
|
||||||
|
let oilData = []
|
||||||
|
this.oilTypeList.forEach(res => {
|
||||||
|
let data = {
|
||||||
|
id:res.numberId,
|
||||||
|
label:res.oilName,
|
||||||
|
oilPrice:res.oilPrice,
|
||||||
|
gbPrice:res.gbPrice
|
||||||
|
}
|
||||||
|
oilData.push(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
this.columns = [oilData]
|
||||||
|
console.log("aaa",this.columns)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log('选中的油号', e);
|
console.log('选中的油号', e);
|
||||||
|
this.oilInfo.oilName = e.value[0].label,
|
||||||
|
this.oilInfo.oilPrice = e.value[0].oilPrice,
|
||||||
|
this.oilInfo.gbPrice = e.value[0].gbPrice
|
||||||
|
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mub">
|
<view class="mub">
|
||||||
<view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="getactvity(item.path)">
|
<!-- <view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="getactvity(item.path)"> -->
|
||||||
|
<view class="mub-box" v-for="(item,index) in activityList" :key="index" @click="intoOtherPage()">
|
||||||
<view class="box-img">
|
<view class="box-img">
|
||||||
<image src="../../static/imgs/xp.jpg" mode=""></image>
|
<image src="../../static/imgs/xp.jpg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
@ -29,6 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -58,11 +60,38 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
datas() {
|
||||||
|
return {
|
||||||
|
datas: [{
|
||||||
|
"activeDescribe": ""
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
intoOtherPage() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pagesHome/activeIn/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
// request({
|
||||||
|
// url: '/business/marketingActivity/activeConsumption/AppletList',
|
||||||
|
// method: 'get',
|
||||||
|
// success: function(res) {
|
||||||
|
// this.datas = res.data
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
request({
|
||||||
|
url: '/business/marketingActivity/activeConsumption/AppletList',
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
this.datas = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
getactvity(url) {
|
getactvity(url) {
|
||||||
if (url) {
|
if (url) {
|
||||||
console.log('跳转中');
|
console.log('跳转中');
|
||||||
|
@ -47,18 +47,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bai-center">
|
<view class="bai-center">
|
||||||
<scroll-view scroll-x="true" class="tap-top">
|
<scroll-view scroll-x="true" class="tap-top">
|
||||||
<view class="sz" v-for="(item,index) in 7" :key="index" @click="transferIndex(index) ">
|
<view class="sz" v-for="(item,index) in categoryList" :key="index" @click="transferIndex(index) ">
|
||||||
<view class="box" :class="{'xztap': qhindex == index}">文字信息</view>
|
<view class="box" :class="{'xztap': qhindex == index}">{{item.categoryName}}</view>
|
||||||
<view class="gang" v-if="qhindex == index"></view>
|
<view class="gang" v-if="qhindex == index"></view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="wrap-box">
|
<view class="wrap-box">
|
||||||
<view class="box-goods" v-for="(item,index) in 3" :key="index" @click="godetails()">
|
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index" @click="godetails()">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image src="../../static/logo.png" mode=""></image>
|
<image :src="baseUrl+'/static/uploadImages/20231106/75bfd9e936974f7a94c2c04e17df1d1b.png'" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-title">
|
<view class="goods-title">
|
||||||
268元套餐券
|
{{item.goodsName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="good-red">
|
<view class="good-red">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
@ -83,7 +83,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -91,6 +91,7 @@
|
|||||||
integralGiftList:{},
|
integralGiftList:{},
|
||||||
title: '',
|
title: '',
|
||||||
qhindex: 0,
|
qhindex: 0,
|
||||||
|
baseUrl: config.baseUrl,
|
||||||
query: {
|
query: {
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
giftName: '',
|
giftName: '',
|
||||||
@ -121,6 +122,7 @@
|
|||||||
// params:{}
|
// params:{}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.categoryList = res.data.records
|
||||||
console.log("hello world",res)
|
console.log("hello world",res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -134,6 +136,7 @@
|
|||||||
// params:data
|
// params:data
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.integralGiftList = res.data.records
|
||||||
console.log("hello world",res)
|
console.log("hello world",res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -10,6 +10,18 @@
|
|||||||
<u-empty text="积分明细" icon="http://cdn.uviewui.com/uview/empty/list.png">
|
<u-empty text="积分明细" icon="http://cdn.uviewui.com/uview/empty/list.png">
|
||||||
</u-empty>
|
</u-empty>
|
||||||
|
|
||||||
|
<u-waterfall v-model="flowList">
|
||||||
|
<template v-slot:left="{leftList}">
|
||||||
|
<view v-for="(item, index) in leftList" :key="index">
|
||||||
|
<!-- 这里编写您的内容,item为您传递给v-model的数组元素 -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-slot:right="{rightList}">
|
||||||
|
<view v-for="(item, index) in rightList" :key="index">
|
||||||
|
<!-- 这里编写您的内容,item为您传递给v-model的数组元素 -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</u-waterfall>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -21,6 +33,8 @@
|
|||||||
title: '',
|
title: '',
|
||||||
|
|
||||||
|
|
||||||
|
subTitle: '2020-05-15',
|
||||||
|
thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -8,31 +8,30 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<view class="centen-siez">
|
<view class="centen-siez">
|
||||||
积分兑换活动一: 积分抵现
|
{{setting.signInRules}}
|
||||||
积分抵现就是当客户积累了一定量的积分后,可以在积分商城中按照指定积分量兑换一定现金,并且在客户消费的时候可以使用,当然也可以结合节点释放该活动优惠,例如在企业店庆、周年庆、节假日等活动期间,使用100个积分点可以作为100元现金,在消费的时候自动抵扣,这种积分规则可以使客户感受到实在的价值,增加客户对企业品牌的黏性,提高企业产品的复购率.
|
</view>
|
||||||
积分兑换活动二: 积分抽奖
|
|
||||||
积分抽奖就是若客户的账户满足一定的积分值后,就可以参加抽奖活动,每次抽奖需要消耗一些积分量。这种方式是企业积分商城消耗客户积分比较快速的一种方式,客户也比较喜欢参与。例如在双十一等活动期间,客户每使用20个积分可以参加一次积分抽奖,客户每次只需要消耗少量的积分就有机会获得大奖。许多客户为得到想要的奖品,会自愿小时许多积分来尝试抽到大奖。有价值的大奖品,比如手机、家电,能有效吸引客户注意
|
|
||||||
积分兑换活动三:积分兑礼
|
|
||||||
积分商城中常见的积分兑换活动有积分兑换礼品,企业可以在积分商城中设置丰富的礼品供客户自行选择,比如客户有100点积分,可以兑换商城中的一个充电宝,或者选择加钱兑换一个小家电等等。这种模式若想要契合所有客户的需求,那么就需要有海量的商品资源提供给客户,帮助企业
|
|
||||||
更好运营。若商家缺乏供应商资源或缺乏开发技术的话,可以使用积分商城,积分商城有超过10万余家供应商,轻松可以帮助企业实现各种积分兑换活动,增加客户黏性,培养忠实客
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
setting:{}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getSettings();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@ -42,9 +41,10 @@
|
|||||||
request({
|
request({
|
||||||
url: '/business/integral/integralSettings/getByStoreId',
|
url: '/business/integral/integralSettings/getByStoreId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params:data
|
// params:data
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
|
this.setting = res.data
|
||||||
console.log("hello world",res)
|
console.log("hello world",res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
82
gasStation-uni/pagesHome/activeIn/index.vue
Normal file
82
gasStation-uni/pagesHome/activeIn/index.vue
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="container">
|
||||||
|
<view class="my-header">
|
||||||
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
||||||
|
<view class="my-text">样版页</view>
|
||||||
|
<view class="my-icons"></view>
|
||||||
|
</view>
|
||||||
|
<!-- 顶部区域 -->
|
||||||
|
|
||||||
|
<view class="" v-for="(item,index) in datas" :key="index">
|
||||||
|
<text>{{item.activeDescribe || ""}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '../../utils/request'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
datas: [],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getData() {
|
||||||
|
request({
|
||||||
|
url: '/business/marketingActivity/activeConsumption/appletList',
|
||||||
|
method: 'get',
|
||||||
|
}).then(res => {
|
||||||
|
this.datas = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
background: #f4f5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 88px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-header {
|
||||||
|
width: 100%;
|
||||||
|
height: 88px;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: #000;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0px 15px;
|
||||||
|
padding-top: 40px;
|
||||||
|
|
||||||
|
.my-icons {
|
||||||
|
width: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -75,6 +75,7 @@
|
|||||||
userInfo: {
|
userInfo: {
|
||||||
storeId: 0,
|
storeId: 0,
|
||||||
staffId: "",
|
staffId: "",
|
||||||
|
phone:'17753808121'
|
||||||
},
|
},
|
||||||
|
|
||||||
type: 'phone',
|
type: 'phone',
|
||||||
|
8
gasStation-uni/store/getters.js
Normal file
8
gasStation-uni/store/getters.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
const getters = {
|
||||||
|
token: state => state.user.token,
|
||||||
|
avatar: state => state.user.avatar,
|
||||||
|
name: state => state.user.name,
|
||||||
|
roles: state => state.user.roles,
|
||||||
|
permissions: state => state.user.permissions
|
||||||
|
}
|
||||||
|
export default getters
|
15
gasStation-uni/store/index.js
Normal file
15
gasStation-uni/store/index.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
import user from '@/store/modules/user'
|
||||||
|
import getters from './getters'
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
modules: {
|
||||||
|
user
|
||||||
|
},
|
||||||
|
getters
|
||||||
|
})
|
||||||
|
|
||||||
|
export default store
|
115
gasStation-uni/store/modules/user.js
Normal file
115
gasStation-uni/store/modules/user.js
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
import config from '@/config'
|
||||||
|
import storage from '@/utils/storage'
|
||||||
|
import constant from '@/utils/constant'
|
||||||
|
import {
|
||||||
|
login,
|
||||||
|
logout,
|
||||||
|
getInfo
|
||||||
|
} from '@/api/login'
|
||||||
|
import {
|
||||||
|
getToken,
|
||||||
|
setToken,
|
||||||
|
removeToken
|
||||||
|
} from '@/utils/auth'
|
||||||
|
|
||||||
|
const baseUrl = config.baseUrl
|
||||||
|
|
||||||
|
const user = {
|
||||||
|
state: {
|
||||||
|
token: getToken(),
|
||||||
|
name: storage.get(constant.name),
|
||||||
|
avatar: storage.get(constant.avatar),
|
||||||
|
roles: storage.get(constant.roles),
|
||||||
|
permissions: storage.get(constant.permissions)
|
||||||
|
},
|
||||||
|
|
||||||
|
mutations: {
|
||||||
|
SET_TOKEN: (state, token) => {
|
||||||
|
state.token = token
|
||||||
|
},
|
||||||
|
SET_NAME: (state, name) => {
|
||||||
|
state.name = name
|
||||||
|
storage.set(constant.name, name)
|
||||||
|
},
|
||||||
|
SET_AVATAR: (state, avatar) => {
|
||||||
|
state.avatar = avatar
|
||||||
|
storage.set(constant.avatar, avatar)
|
||||||
|
},
|
||||||
|
SET_ROLES: (state, roles) => {
|
||||||
|
state.roles = roles
|
||||||
|
storage.set(constant.roles, roles)
|
||||||
|
},
|
||||||
|
SET_PERMISSIONS: (state, permissions) => {
|
||||||
|
state.permissions = permissions
|
||||||
|
storage.set(constant.permissions, permissions)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
// 登录
|
||||||
|
Login({
|
||||||
|
commit
|
||||||
|
}, userInfo) {
|
||||||
|
const username = userInfo.username.trim()
|
||||||
|
const password = userInfo.password
|
||||||
|
const code = userInfo.code
|
||||||
|
const uuid = userInfo.uuid
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
login(username, password, code, uuid).then(res => {
|
||||||
|
setToken(res.token)
|
||||||
|
commit('SET_TOKEN', res.token)
|
||||||
|
resolve()
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取用户信息
|
||||||
|
GetInfo({
|
||||||
|
commit,
|
||||||
|
state
|
||||||
|
}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
getInfo().then(res => {
|
||||||
|
const user = res.user
|
||||||
|
const avatar = baseUrl + user.avatar
|
||||||
|
const username = (user == null || user.userName == "" || user.userName ==
|
||||||
|
null) ? "" : user.userName
|
||||||
|
if (res.roles && res.roles.length > 0) {
|
||||||
|
commit('SET_ROLES', res.roles)
|
||||||
|
commit('SET_PERMISSIONS', res.permissions)
|
||||||
|
} else {
|
||||||
|
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||||
|
}
|
||||||
|
commit('SET_NAME', username)
|
||||||
|
commit('SET_AVATAR', avatar)
|
||||||
|
resolve(res)
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 退出系统
|
||||||
|
LogOut({
|
||||||
|
commit,
|
||||||
|
state
|
||||||
|
}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
logout(state.token).then(() => {
|
||||||
|
commit('SET_TOKEN', '')
|
||||||
|
commit('SET_ROLES', [])
|
||||||
|
commit('SET_PERMISSIONS', [])
|
||||||
|
removeToken()
|
||||||
|
storage.clean()
|
||||||
|
resolve()
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default user
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user