123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <template>
- <view class="content">
- <view class="list">
- <view class="item" v-for="(item,index) in iconList" :key="index" @click="go_link(item)">
- <view class="icon">
- <image :src="item.icon" mode=""></image>
- </view>
- <view class="name">{{item.title}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "t-i-icon",
- props: [
- "iconList",
- "mine_code"
- ],
- data() {
- return {
- };
- },
- methods: {
- go_link(item) {
- let link = item.link
- console.log(link)
-
- // OA系统
- if(link.indexOf("oa_system.nxjiewei.com") != -1 ){
- uni.navigateTo({
- url:"../../origanization/OA/h5/h5",
- success: (res) =>{
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', {
- url: link,
- title: item.title
- })
- }
- })
-
- return
- }
-
- // 二维码
- if (link.indexOf("pageId") != -1 && link.indexOf("app:") == -1) {
- let pageId = ""
-
- function GetQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
- var r = link.match(reg);
- if (r != null) return unescape(r[2]);
- return null;
- }
- console.log(GetQueryString("pageId"))
- if (GetQueryString("pageId")) {
- pageId = GetQueryString("pageId")
- } else {
- pageId = link.split('=')[1]
- }
-
- uni.navigateTo({
- url: "../../index/record/record?pageId=" + pageId + "&mine_code=" + this.mine_code,
- })
- }
- // h5
- if (link.indexOf("pageId") == -1 && link.indexOf("app:") == -1) {
- uni.navigateTo({
- url:"../../index/h5/h5?url="+link
- })
- }
-
- }
- }
- }
- </script>
- <style lang="scss">
- .content {
- margin-bottom: 30rpx;
- background-color: #FFFFFF;
- box-sizing: border-box;
- padding: 50rpx 25rpx 25rpx 25rpx;
- }
- .list {
- overflow: hidden;
- .item {
- float: left;
- margin-right: 25rpx;
- margin-bottom: 30rpx;
- width: 120rpx;
- .icon {
- width: 120rpx;
- text-align: center;
- image {
- width: 104rpx;
- height: 104rpx;
- border-radius: 50%;
- }
- }
- .name {
- width: 120rpx;
- text-align: center;
- font-size: 30rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- .item:nth-child(5n) {
- margin-right: 0;
- }
- }
- </style>
|