123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <template>
- <view class="content">
- <view class="headTop" @click="back()" :style="{paddingTop:statusBarHeight+'rpx'}">
- <!-- <view class="iconfont icon" style="transform:rotate(90deg);"></view> -->
- <p class="p">参与规则</p>
- </view>
- <view class="wrap leakagebox" v-if="content">
- <view v-html="content"></view>
- </view>
-
- <view class="noMore" v-else>暫無數據</view>
- </view>
- </template>
- <script>
- import {
- createWeb3Modal,
- defaultWagmiConfig,
- useWeb3ModalState,
- useWeb3Modal
- } from '@web3modal/wagmi/vue'
- import {
- mainnet,
- arbitrum,
- optimism,
- bsc,
- polygon
- } from '@wagmi/core/chains'
- import {
- getAccount, //地址
- writeContract,
- disconnect, //断开
- watchAccount,
- createConfig, //创建客户端
- configureChains, //配置链
- getNetwork, //获取链
- getWalletClient,
- fetchToken,
- connect, //链接
- watchContractEvent,
- watchNetwork,
- sendTransaction,
- signMessage,
- prepareSendTransaction
- } from '@wagmi/core'
- import {
- publicProvider
- } from '@wagmi/core/providers/public'
- import {
- InjectedConnector
- } from '@wagmi/core/connectors/injected'
- import {
- parseEther
- } from 'viem'
- const projectId = 'c46fe115e62fd8cc283e8db10b3a7fa7'
- // 2. Create wagmiConfig
- const metadata = {
- name: 'Web3Modal',
- description: 'Web3Modal Example',
- url: 'https://web3modal.com',
- icons: ['https://avatars.githubusercontent.com/u/37784886']
- }
- const chains = [bsc]
- const wagmiConfig = defaultWagmiConfig({
- chains,
- projectId,
- metadata
- })
-
- // 3. Create modal
- const modal = createWeb3Modal({
- wagmiConfig,
- projectId,
- chains,
- optionalChains: [{
- chainId: 128,
- chainName: "HECO",
- nativeCurrency: {
- name: "HECO",
- symbol: "HT",
- decimals: 18,
- },
- rpcUrls: ["https://http-mainnet.hecochain.com/ "]
- },
- {
- chainId: 137,
- chainName: "MATIC",
- nativeCurrency: {
- name: "MATIC",
- symbol: "MATIC",
- decimals: 18,
- },
- rpcUrls: ["https://matic.mytokenpocket.vip/ "],
-
- }
- ],
- defaultChain: bsc,
- tokens: {
- 1: {
- address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
- image: 'token_image_url' //optional ETH
- },
- 56: {
- address: '0x55d398326f99059ff775485246999027b3197955',
- image: 'token_image_url' //optional BSC
- },
- 137: {
- address: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
- image: 'token_image_url' //optional MATIC
- },
- 128: {
- address: '0xa71edc38d189767582c38a3145b5873052c3e47a',
- image: 'token_image_url' //optional HT
- }
- },
-
- //主题覆盖
- themeVariables: {
- '--w3m-accent': '#02cc66',
- },
- //主题亮,暗
- themeMode: 'light'
-
- })
-
-
- export default {
- data() {
- return {
- statusBarHeight:'',
- content:''
-
- }
- },
- computed: {
- i18n() {
- return this.$t('lang')
- }
- },
- onLoad() {
- uni.startPullDownRefresh(); //这里表示当进入页面的时候就开始执行下拉刷新动画
- this.getList()
- //获取状态栏+导航栏的高度
- let _that = this;
- uni.getSystemInfo({
- success(e) {
- if (e.platform == "ios") {
- _that.statusBarHeight = e.statusBarHeight + 45;
- } else {
- _that.statusBarHeight = e.statusBarHeight + 50;
- }
- }
- })
- },
- //监听该页面用户下拉刷新事件
- onPullDownRefresh() {
- this.getList()
- setTimeout(function () {
- uni.stopPullDownRefresh();
- }, 1000);
- },
-
- methods: {
- getList(){
- this.$http.guize().then(res => {
- var datas =res.data
- if(datas.code == 200 ){
- this.content = datas.data.content.replace(/\<img/gi, '<img class="maximg" ')
-
- }else{
- // uni.showToast({
- // title:datas.msg,
- // icon:'none',
- // })
- }
- }).catch(err => {
- // uni.showToast({
- // title:err,
- // icon:'none',
- // })
- })
- },
- back(){
- uni.navigateBack()
- }
-
- },
-
- }
- </script>
- <style scoped lang="scss">
- .headTop{
- width: 94%;
- margin: 0 3%;
- font-size: 34rpx;
- display: flex;
- align-items: center;
- padding-bottom: 20rpx;
- .icon{
- display: block;
- width:10%;
- font-size: 45rpx;
- color: #000;
- }
- .p{
- width: 100%;
- text-align: center;
- display: block;
- white-space: nowrap;
- /* 强制性的在一行显示所有的文本,直到文本结束或者遭遇br标签对象才换行*/
- overflow: hidden;
- text-overflow: ellipsis;/* 溢出的文字隐藏起来*/
-
- }
- }
-
- .leakagebox{
- position: relative;
- font-size: 28rpx;
- color: #333;
- line-height: 80rpx;
-
- }
- .mallList{
-
- margin-top: 40rpx;
- flex-wrap: wrap;
- .listli{
- width: 41%;
- padding:30rpx 24rpx;
- // border-radius: 8rpx;
- // background-color: #fff;
- // box-shadow: 0px 1px 5px 0px #C9D9F199;
- margin-bottom: 30rpx;
- margin-right: 28rpx;
-
- }
- .listli:nth-child(2n){
- margin-right: 0;
- }
- .rows {
- background-color: #fff;
- border-radius: 20rpx;
- //padding: 32rpx 0;
-
-
- .title {
- margin-bottom: 20rpx;
- .titfl {
- color: #333333;
- font-size: 32rpx;
- font-weight: 700;
- .typeTips{
- width: 20rpx;
- height: 20rpx;
- border-radius: 50rpx;
- margin-left: 20rpx;
- }
- .red{
- background-color: red;
- }
- .green{
- background-color: #14C670;
- }
- }
-
- .price {
- color: #F5A94F;
- }
-
- }
-
- .listimg {
- width: 48rpx;
- height: 48rpx;
- margin-right: 10rpx;
- }
-
- .iconimg {
- width: 36rpx;
- height: 36rpx;
- }
-
- .rowsfl {
- font-size: 28rpx;
- .times {
- margin-bottom: 24rpx;
- color: #828282;
- span {
- color: #333333;
- }
- }
- }
-
- .rowsfr {
- background: linear-gradient(90.89deg, #38F957 49.57%, #1DEEE1 99.24%);
- width: 80%;
- height: 64rpx;
- text-align: center;
- line-height: 64rpx;
- color: #040616;
- font-size: 28rpx;
- border-radius: 8rpx;
- margin-left: 10%;
- margin-top: 12rpx;
- }
- }
- }
- </style>
|