|
@@ -17,8 +17,8 @@
|
|
|
|
|
|
<view class="currency-box">
|
|
|
<block v-for="(item , index) in currencyList" :key="`currency_${index}`">
|
|
|
- <view class="currency-item" @click.stop="topUp(item.name)">
|
|
|
- <image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
|
|
|
+ <view class="currency-item" @click.stop="topUp(item)">
|
|
|
+ <image class="currency-icon" :src="item.logo" mode="aspectFit"></image>
|
|
|
<text class="currency-name">{{ item.name }}</text>
|
|
|
</view>
|
|
|
</block>
|
|
@@ -28,30 +28,31 @@
|
|
|
|
|
|
<script>
|
|
|
import reverseBack from "@/components/headModules/reverse-back.vue"
|
|
|
- import { Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
|
|
|
+ import { Api_getQuotationNew , Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
|
|
|
export default {
|
|
|
name: 'selectCurrency',
|
|
|
components: {
|
|
|
reverseBack
|
|
|
},
|
|
|
data() {
|
|
|
- return {
|
|
|
- currencyList: [{
|
|
|
- icon: require('@/static/images/bi/bi_01.png'),
|
|
|
- name: 'BTC'
|
|
|
- },
|
|
|
- {
|
|
|
- icon: require('@/static/images/bi/bi_02.png'),
|
|
|
- name: 'BTC'
|
|
|
- },
|
|
|
- {
|
|
|
- icon: require('@/static/images/bi/bi_03.png'),
|
|
|
- name: 'BTC'
|
|
|
- },
|
|
|
- {
|
|
|
- icon: require('@/static/images/bi/bi_03.png'),
|
|
|
- name: 'BTC'
|
|
|
- }
|
|
|
+ return {
|
|
|
+ currencyList: [
|
|
|
+ // {
|
|
|
+ // icon: require('@/static/images/bi/bi_01.png'),
|
|
|
+ // name: 'BTC'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // icon: require('@/static/images/bi/bi_02.png'),
|
|
|
+ // name: 'BTC'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // icon: require('@/static/images/bi/bi_03.png'),
|
|
|
+ // name: 'BTC'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // icon: require('@/static/images/bi/bi_03.png'),
|
|
|
+ // name: 'BTC'
|
|
|
+ // }
|
|
|
]
|
|
|
};
|
|
|
},
|
|
@@ -61,17 +62,44 @@
|
|
|
|
|
|
methods:{
|
|
|
getBiTypeList(){
|
|
|
- Api_getBiTypeList().then(res => {
|
|
|
+ uni.showLoading()
|
|
|
+ Api_getQuotationNew().then(res => {
|
|
|
console.log('Api_getBiTypeList = ' , res)
|
|
|
+ this.currencyList = res || []
|
|
|
}).catch(err => {
|
|
|
console.log('Api_getBiTypeList = ' , err)
|
|
|
+ }).finally(() => {
|
|
|
+ uni.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
// pages/content/top-up
|
|
|
- topUp(name){
|
|
|
- uni.navigateTo({
|
|
|
- url:`/pages/content/top-up?name=${name}`
|
|
|
- })
|
|
|
+ topUp(item){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ const time = new Date().getTime();
|
|
|
+ let key = {};
|
|
|
+ key[`bi_${time}`] = item
|
|
|
+ this.$setStorageSync('select' , key)
|
|
|
+
|
|
|
+ let path = `/pages/content/top-up?key=${`bi_${time}`}`
|
|
|
+
|
|
|
+ const pages = getCurrentPages()
|
|
|
+ if(pages.length > 2 && pages[pages.length - 2].route === 'pages/content/top-up' ){
|
|
|
+ console.log('pages 11 = ' , pages , pages[pages.length - 2].route)
|
|
|
+
|
|
|
+ uni.redirectTo({
|
|
|
+ url:path
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ console.log('222')
|
|
|
+ uni.navigateTo({
|
|
|
+ url: path
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: path
|
|
|
+ // });
|
|
|
},
|
|
|
// 查看充值记录
|
|
|
lookRecord(){
|
|
@@ -79,6 +107,7 @@
|
|
|
url:'/pages/content/charge-record'
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|