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