Commit 685aeed2 by 李伟康

flx 修复BUG

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