去除获取金币比例接口改为从公共数据common里获取
This commit is contained in:
parent
85708668b3
commit
34e1b9ed1f
|
|
@ -289,6 +289,8 @@
|
|||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?'0':60}px)`
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@
|
|||
<image class="hot" src="@/static/images/hot.png" mode=""></image>
|
||||
<text class="u-font-28 font-bold">{{info.price}}元解锁全剧</text>
|
||||
</view>
|
||||
<view class="pay-list-item" @click="payBtnClick('gold',1)">
|
||||
<view class="pay-list-item" @click="payBtnClick('gold',1)" v-if="nowDanjiPrice*goldBili>0">
|
||||
<image class="hot" src="@/static/images/hot.png" mode=""></image>
|
||||
<text class="u-font-28 font-bold">{{nowDanjiPrice*jinbiBili}}金币解锁单集视频</text>
|
||||
<text class="u-font-28 font-bold">{{nowDanjiPrice*goldBili}}金币解锁单集视频</text>
|
||||
</view>
|
||||
<view class="pay-list-item" @click="payBtnClick('money',1)">
|
||||
<!-- <image class="hot" src="@/static/images/hot.png" mode=""></image> -->
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
} from '@/commons/config.js'
|
||||
import color from '@/commons/color.js'
|
||||
import {
|
||||
debounce
|
||||
debounce,throttle
|
||||
} from 'lodash';
|
||||
import * as Api from '@/api/video/index.js'
|
||||
import infoBox from '@/utils/infoBox.js'
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
|
||||
let initing = true
|
||||
const refPoster = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -473,11 +473,10 @@
|
|||
}
|
||||
|
||||
|
||||
let jinbiBili = ref(0)
|
||||
let goldBili = ref($common.goldBili||0)
|
||||
let wHeight = ref(0)
|
||||
async function configInit() {
|
||||
const res = await Api.getJinbiBili()
|
||||
jinbiBili.value = res.value
|
||||
goldBili.value = $common.goldBili
|
||||
|
||||
const sysInfo = uni.getSystemInfoSync()
|
||||
wHeight.value = sysInfo.windowHeight
|
||||
|
|
@ -682,7 +681,6 @@
|
|||
function waiting() {
|
||||
|
||||
}
|
||||
let initing = true
|
||||
configInit()
|
||||
onMounted(() => {
|
||||
init()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import {
|
||||
defineStore
|
||||
} from "pinia";
|
||||
import {getCommonConfig} from '@/api/init.js'
|
||||
import {
|
||||
getCommonConfig
|
||||
} from '@/api/init.js'
|
||||
const $map = {
|
||||
882: 'isWxIosPay',
|
||||
833: 'checkIosLogin',
|
||||
|
|
@ -34,27 +36,28 @@ const $map = {
|
|||
881: '',
|
||||
109: '',
|
||||
922: 'withdrawNum',
|
||||
500:'payTips'
|
||||
500: 'payTips',
|
||||
914: 'goldBili' // 金币比例
|
||||
}
|
||||
|
||||
export const useCommonStore = defineStore("common", {
|
||||
state() {
|
||||
return {
|
||||
payTips:'付款完成后不要忘记抽红包哦'
|
||||
payTips: '付款完成后不要忘记抽红包哦',
|
||||
goldBili:0
|
||||
};
|
||||
},
|
||||
actions:{
|
||||
async init(){
|
||||
const res=await getCommonConfig()
|
||||
if(res){
|
||||
actions: {
|
||||
async init() {
|
||||
const res = await getCommonConfig()
|
||||
if (res) {
|
||||
for (let i in $map) {
|
||||
const key = $map[i]
|
||||
if (key) {
|
||||
this[key]=res[i]
|
||||
this[key] = res[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(res);
|
||||
}
|
||||
},
|
||||
unistorage: true, // 开启后对 state 的数据读写都将持久化
|
||||
|
|
|
|||
Loading…
Reference in New Issue