revert: 所有代码与custom/common分支同

This commit is contained in:
2026-01-05 15:56:49 +08:00
parent 8ef6975ee1
commit 60a0e5133e
219 changed files with 14860 additions and 15585 deletions

View File

@@ -15,49 +15,51 @@
</template>
<script>
import htmlParser from '@/common/js/html-parser.js';
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
// #ifdef MP-WEIXIN
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
// #endif
},
data() {
return {
id: 0,
detail: {},
content: ''
};
},
onLoad(options) {
this.id = options.id || 0;
// 小程序扫码进入
if (options.scene) {
var sceneParams = decodeURIComponent(options.scene);
this.id = sceneParams.split('-')[1];
}
if (this.id == 0) {
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
}
},
onShow() {
this.getData();
},
methods: {
getData() {
this.$api.sendRequest({
url: '/api/help/info',
data: {
id: this.id
},
success: res => {
if (res.code == 0) {
if (res.data) {
this.detail = res.data;
this.$langConfig.title(this.detail.title);
this.content = htmlParser(res.data.content);
this.setPublicShare();
import htmlParser from '@/common/js/html-parser';
export default {
data() {
return {
id: 0,
detail: {},
content: ''
};
},
onLoad(options) {
this.id = options.id || 0;
// 小程序扫码进入
if (options.scene) {
var sceneParams = decodeURIComponent(options.scene);
this.id = sceneParams.split('-')[1];
}
if (this.id == 0) {
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
}
},
onShow() {
this.getData();
},
methods: {
getData() {
this.$api.sendRequest({
url: '/api/help/info',
data: {
id: this.id
},
success: res => {
if (res.code == 0) {
if (res.data) {
this.detail = res.data;
this.$langConfig.title(this.detail.title);
this.content = htmlParser(res.data.content);
this.setPublicShare();
} else {
this.$util.showToast({
title: res.message
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
}, 2000);
}
} else {
this.$util.showToast({
title: res.message
@@ -66,81 +68,73 @@ export default {
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
}, 2000);
}
} else {
this.$util.showToast({
title: res.message
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/help/list', {}, 'redirectTo');
}, 2000);
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
});
},
// 设置公众号分享
setPublicShare() {
let shareUrl = this.$config.h5Domain + '/pages_tool/help/detail?id=' + this.id;
this.$util.setPublicShare({
title: this.detail.title,
desc: '',
link: shareUrl,
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
});
}
},
// 设置公众号分享
setPublicShare() {
let shareUrl = this.$config.h5Domain + '/pages_tool/help/detail?id=' + this.id;
this.$util.setPublicShare({
title: this.detail.title,
desc: '',
link: shareUrl,
imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : ''
});
onShareAppMessage(res) {
var title = this.detail.title;
var path = '/pages_tool/help/detail?id=' + this.id;
return {
title: title,
path: path,
success: res => {},
fail: res => {}
};
},
//分享到朋友圈
onShareTimeline() {
var title = this.detail.title;
var query = 'id=' + this.id;
return {
title: title,
query: query,
imageUrl: ''
};
}
},
onShareAppMessage(res) {
var title = this.detail.title;
var path = '/pages_tool/help/detail?id=' + this.id;
return {
title: title,
path: path,
success: res => { },
fail: res => { }
};
},
//分享到朋友圈
onShareTimeline() {
var title = this.detail.title;
var query = 'id=' + this.id;
return {
title: title,
query: query,
imageUrl: ''
};
}
};
};
</script>
<style lang="scss">
.page {
width: 100%;
height: 100%;
padding: 30rpx;
box-sizing: border-box;
background: #ffffff;
}
.help-title {
font-size: $font-size-toolbar;
text-align: center;
}
.help-content {
margin-top: $margin-updown;
word-break: break-all;
}
.help-meta {
text-align: right;
margin-top: $margin-updown;
color: $color-tip;
.help-time {
font-size: $font-size-tag;
.page {
width: 100%;
height: 100%;
padding: 30rpx;
box-sizing: border-box;
background: #ffffff;
}
.help-title {
font-size: $font-size-toolbar;
text-align: center;
}
.help-content {
margin-top: $margin-updown;
word-break: break-all;
}
.help-meta {
text-align: right;
margin-top: $margin-updown;
color: $color-tip;
.help-time {
font-size: $font-size-tag;
}
}
}
</style>

View File

@@ -3,8 +3,7 @@
<block v-if="dataList.length">
<view class="help-item" v-for="(item, index) in dataList" :key="index">
<view :class="['item-title', item.child_list.length == 0 ? 'empty' : '']">{{ item.class_name }}</view>
<view class="item-content" v-for="(s_item, s_index) in item.child_list" :key="s_index"
@click="helpDetail(s_item)">{{ s_item.title }}</view>
<view class="item-content" v-for="(s_item, s_index) in item.child_list" :key="s_index" @click="helpDetail(s_item)">{{ s_item.title }}</view>
</view>
</block>
<block v-else><ns-empty text="暂无帮助信息" :isIndex="false"></ns-empty></block>
@@ -20,18 +19,12 @@
<script>
export default {
components: {
loadingCover: () => import('@/components/loading-cover/loading-cover.vue'),
// #ifdef MP-WEIXIN
privacyPopup: () => import('@/components/wx-privacy-popup/privacy-popup.vue'),
// #endif
},
data() {
return {
dataList: []
};
},
onLoad() { },
onLoad() {},
onShow() {
this.setPublicShare();
this.getData();
@@ -92,8 +85,8 @@ export default {
return {
title: title,
path: path,
success: res => { },
fail: res => { }
success: res => {},
fail: res => {}
};
}
};
@@ -119,7 +112,6 @@ export default {
font-size: 30rpx;
color: #000;
border-bottom: 2rpx solid #f1f1f1;
&.empty {
padding-bottom: 0;
border-bottom: none;