Commit 685aeed2 by 李伟康

flx 修复BUG

1 parent bba50b52
......@@ -2,7 +2,7 @@ import http from "../request/http";
module.exports = {
/**获取短信 */
getSmsCode(data = {}) {
getSmsCode (data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.sms.get.code", data);
},
......@@ -14,12 +14,12 @@ module.exports = {
return http.fetch('dj.api.smartcarlife.sms.applogin', data)
},
/**免登 */
autoLogin(data = {}) {
autoLogin (data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.sms.noSignIn.login", data);
},
// 获取园区店下的4s店
getSceneMerchantRefStoreList(data) {
getSceneMerchantRefStoreList (data) {
data.projectName = "boutique";
return http.post({
method: "dj.api.scenemerchantref.query4SRefByYqShopByLogin",
......@@ -27,20 +27,20 @@ module.exports = {
});
},
/**获取帐号列表 */
getListSelectAccount(data = {}) {
getListSelectAccount (data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.workWechat.listSelectAccount", data);
},
/**选择帐号登陆 */
selectAccountLogin(data) {
selectAccountLogin (data) {
data.projectName = "boutique";
return http.fetch(
"dj.api.smartcarlife.workWechat.selectAccountLogin",
data
);
},
// 选择4s店和场景
selectMerchantScene(data) {
// 选择4s店和场景
selectMerchantScene (data) {
data.projectName = "boutique";
return http.fetch(
"dj.api.smartcarlife.selectMerchantScene",
......@@ -48,11 +48,16 @@ module.exports = {
);
},
// 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI(data) {
getYqMerchantSceneConfigAPI (data) {
data.projectName = "boutique";
return http.post({
method: "dj.api.smartcarlife.select.openScene.info",
...data,
});
},
/**退出*/
logout (data = {}) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.logout', data);
},
};
const target = ["ip", "dev", "uat", "prod", "beta"];
const index = 1;
const index = 2;
/**
*
0本地
......
......@@ -60,7 +60,7 @@ export default {
type: String,
data: Array,
id: [String, Number],
showPayBtn: Object
showPayBtn: Boolean
},
data () {
return {
......
......@@ -107,40 +107,34 @@ const ACCOUT_LIST = [
export default {
name: "payPop",
props: {
payInfo: Object,// 支付信息
accountInfo: Object // 对公账户信息
},
data () {
return {
payActive: 1,
paymentType: [],
accountList: ACCOUT_LIST,
title: ''
title: '',
accountInfo: {},
payInfo: {}
};
},
computed: {
watchPayInfo () {
return this.$store.state.user.paymentType
},
},
watch: {
payInfo (n) {
if (n) {
let item = {
name: "扫码支付",
type: 1,
title: '付款二维码'
watchPayInfo: {
immediate: true,
handler (newval) {
this.paymentType = newval
if (newval.length) {
this.payInfo = newval.find(i => i.paymentType == 1) || {}
this.accountInfo = newval.find(i => i.paymentType == 2) || {}
this.handleSwitchTab(newval[0])
}
this.paymentType.push(item)
this.handleSwitchTab(item)
}
},
accountInfo (n) {
if (n) {
let item = {
name: "对公账户",
type: 2,
title: '付款方式'
}
this.paymentType.push(item)
if(this.paymentType.length == 1) this.handleSwitchTab(item)
}
}
},
methods: {
// 切换tab
......@@ -221,8 +215,8 @@ export default {
border-radius: 0 48rpx 48rpx 0;
}
}
.single{
border-radius:48rpx !important;
.single {
border-radius: 48rpx !important;
}
}
.payment-content {
......
......@@ -49,7 +49,7 @@
@finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="payInfo || accountInfo"
:showPayBtn="showPayBtn"
/>
<view
class="pen-box"
......@@ -60,8 +60,6 @@
</template>
<pay-pop
ref="pay"
:payInfo="payInfo"
:accountInfo="accountInfo"
></pay-pop>
<finish-step
ref="stepRef"
......@@ -94,15 +92,13 @@ export default {
type: {
type: String,
default: 'preview'
},
payInfo: Object,// 支付信息
accountInfo: Object // 对公账户信息
}
},
data () {
return {
drawStatus: false,
finishVisible: false,
showPayBtn: false
};
},
computed: {
......@@ -111,7 +107,10 @@ export default {
},
penSwitch () {
return this.type != 'preview' && this.drawStatus
}
},
watchPayInfo () {
return this.$store.state.user.paymentType
},
},
watch: {
watchStatus: {
......@@ -120,9 +119,15 @@ export default {
if (newval) this.drawStatus = false
}
},
watchPayInfo: {
immediate: true,
handler (newval) {
this.showPayBtn = newval.length ? true : false
}
}
},
mounted () {
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
......
......@@ -212,8 +212,8 @@ export default {
}
},
formatTime (num) {
let minutes = Math.floor(num / 60) || '00',
seconds = num % 60 || '00'
let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds
minutes = minutes < 10 ? `0${minutes}` : minutes
return {
......@@ -295,12 +295,12 @@ export default {
background: #ffffff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 16rpx 32rpx;
padding: 24rpx 32rpx;
position: relative;
.status {
position: absolute;
top: 22rpx;
right: 24rpx;
top: 24rpx;
right: 32rpx;
width: 88rpx;
height: 44rpx;
background: #fdece9;
......@@ -318,9 +318,10 @@ export default {
font-weight: 500;
font-size: 32rpx;
color: #292d33;
.sprite-icon {
margin-left: 8rpx;
}
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 70%;
}
.goods-name {
font-weight: 500;
......
......@@ -34,7 +34,10 @@
@click="logout"
>退出</view>
</view>
<view class="a" @click="jump('agreement')">《用户隐私协议》</view>
<view
class="a"
@click="jump('agreement')"
>《用户隐私协议》</view>
<view
class="icp flex"
@click="jump('icp')"
......@@ -74,14 +77,33 @@ export default {
})
},
// 退出
logout () {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.$storage.rm("noSignInUuid");
this.stopAudio();
uni.reLaunch({
url: "/pages/common/login",
});
async logout () {
// this.stopAudio();
try {
uni.showLoading()
const { code, message } = await uni.$api.userApi.logout()
console.log(code)
if (code == 0) {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.$storage.rm("noSignInUuid");
setTimeout(() => {
uni.hideLoading()
uni.reLaunch({
url: "/pages/common/login",
});
}, 500)
} else throw message
} catch (error) {
console.log(error)
uni.hideLoading()
uni.showToast({
title: error,
icon: "none",
});
}
},
jump (type) {
let url = type == 'icp' ? 'https://beian.miit.gov.cn/' : 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
......
......@@ -143,8 +143,6 @@
:id.sync="id"
:media="moduleList"
:type.sync="type"
:payInfo="payInfo"
:accountInfo="accountInfo"
@back="back"
@done="done"
ref="detail"
......@@ -216,8 +214,6 @@ export default {
icon: 'record'
}],
tabIndex: 0,
payInfo: null,
accountInfo: null,
dateKey:null
};
},
......@@ -374,8 +370,22 @@ export default {
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId,
});
this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2);
let paymentType = []
data.find((item) => {
if(item.paymentType == 1) paymentType.push({
name: "扫码支付",
type: 1,
title: '付款二维码',
...item
})
if(item.paymentType == 2) paymentType.push( {
name: "对公账户",
type: 2,
title: '付款方式',
...item
})
})
this.$store.dispatch("setPaymentType",paymentType)
},
changeIndex (index) {
this.tabIndex = index
......
......@@ -21,6 +21,7 @@ export default {
historyStatus: Date.now(),
carBrands: [],
employeeList: [],
paymentType: []
};
},
mutations: {
......@@ -54,6 +55,9 @@ export default {
clearHistory ({ state }) {
state.historyStatus = Date.now()
},
setPaymentType ({ state }, value) {
state.paymentType = value
},
setCarBrandsList ({ state }, value) {
state.carBrands = value
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!