Commit aa64b786 by xinla

--no commit message

1 parent 4875075e
...@@ -34,14 +34,18 @@ export default { ...@@ -34,14 +34,18 @@ export default {
</div> </div>
</template> </template>
<template v-else-if="[7, 9, 10].includes(+data.type)"> <template v-else-if="[7, 9, 10].includes(+data.type)">
<div class="g-card g-pad20 cc ac" style="width: 80%"> <div class="g-card g-pad20 cc ac" style="width: 70%; padding-bottom: 50px">
小程序 <div class="mt10">小程序</div>
<el-image style="width: 120px; height: 120px" :src="data.avatar" error="头像" fit="fit"></el-image> <div class="mt20 mb20">
<el-image style="width: 120px; height: 120px" :src="data.avatar">
<!-- <div slot="placeholder">请设置</div> -->
</el-image>
</div>
<el-button type="primary">点击打开小程序</el-button> <el-button type="primary">点击打开小程序</el-button>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="g-card g-pad20 cc ac" style="width: 80%"> <div class="g-card g-pad20 cc ac" style="width: 70%">
<div class="al bfc-o"> <div class="al bfc-o">
<el-image <el-image
class="fl mr10" class="fl mr10"
......
...@@ -178,9 +178,9 @@ export default { ...@@ -178,9 +178,9 @@ export default {
<i class="el-icon-copy-document copy-btn cp" title="复制" :data-clipboard-text="row.shortLink"></i> <i class="el-icon-copy-document copy-btn cp" title="复制" :data-clipboard-text="row.shortLink"></i>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status"> <!-- <el-table-column label="状态" align="center" prop="status">
<template slot-scope="{ row }">{{ dictStatus[row.status + ''] }}</template> <template slot-scope="{ row }">{{ dictStatus[row.status + ''] }}</template>
</el-table-column> </el-table-column> -->
<el-table-column label="最后更新时间" align="center" prop="updateTime" show-overflow-tooltip></el-table-column> <el-table-column label="最后更新时间" align="center" prop="updateTime" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
......
...@@ -6,14 +6,16 @@ ...@@ -6,14 +6,16 @@
</div> </div>
</template> </template>
<template v-else-if="[7, 9, 10].includes(+data.type)"> <template v-else-if="[7, 9, 10].includes(+data.type)">
<div class="g-card g-pad20 cc ac" style="width: 80%"> <div class="g-card g-pad20 cc ac" style="width: 70%">
小程序 <div class="mt10">小程序</div>
<image style="width: 120px; height: 120px" :src="data.avatar" error="头像" fit="fit"></image> <div class="mt20 mb20">
<image style="width: 120px; height: 120px" :src="data.avatar" error="头像" fit="fit"></image>
</div>
<button type="primary">点击打开小程序</button> <button type="primary">点击打开小程序</button>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="g-card g-pad20 cc ac" style="width: 80%"> <div class="g-card g-pad20 cc ac" style="width: 70%">
<div class="al bfc-o"> <div class="al bfc-o">
<image class="fl mr10" style="width: 50px; height: 50px" :src="data.avatar" error="头像" fit="fit"></image> <image class="fl mr10" style="width: 50px; height: 50px" :src="data.avatar" error="头像" fit="fit"></image>
<div class="toe">{{ data.name || '无名称' }}</div> <div class="toe">{{ data.name || '无名称' }}</div>
...@@ -27,42 +29,61 @@ ...@@ -27,42 +29,61 @@
</template> </template>
<script> <script>
import { getDetail } from '@/api/intelligentShortLink' import {
import { touchTypeDict } from './mixin' getDetail
} from '@/api/intelligentShortLink'
import {
touchTypeDict
} from './mixin'
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
data: {}, data: {},
touchTypeDict, touchTypeDict,
} }
}, },
onLoad() {}, onLoad() {},
created() { created() {
// let id = this.$route.query.id // let id = this.$route.query.id
var pages = getCurrentPages() var pages = getCurrentPages()
var page = pages[pages.length - 1] var page = pages[pages.length - 1]
// console.log(1,page.route) // console.log(1,page.route)
this.getDetail(page.route) this.getDetail(page.route)
}, },
methods: { methods: {
getDetail(path) { getDetail(path) {
this.loading = true this.loading = true
getDetail(path) getDetail(path)
.then(({ data }) => { .then(({
this.data = data data
uni.setNavigationBarTitle({ }) => {
title: touchTypeDict[data.type].previewMobileTitle, this.data = data
uni.setNavigationBarTitle({
title: touchTypeDict[data.type].previewMobileTitle,
})
}) })
.catch(() => {})
.finally(() => {
this.loading = false
})
},
open() {
wx.navigateToMiniProgram({
appId: '',
path: 'page/index/index?id=123',
extraData: {
foo: 'bar',
},
envVersion: 'develop',
success(res) {
// 打开成功
},
}) })
.catch(() => {}) },
.finally(() => {
this.loading = false
})
}, },
}, }
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!