资讯详情

This commit is contained in:
qiaocl 2024-12-10 17:27:58 +08:00
parent c16b56c205
commit cd43da3ba7
82 changed files with 660 additions and 601 deletions

View File

@ -307,7 +307,7 @@
time: that.regTime,
weight: that.weight,
height: that.height,
head_circumference: that.head ? that.head : 0
head_data: that.head ? that.head : 0
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)

View File

@ -12,15 +12,9 @@
// URL
onLoad(options) {
let that = this
let url = ''
let token = uni.getStorageSync('token')
if (options.id) {
url = "https://tc.pcxbc.com/model_content?token=" + token + '&id=' + options.id
}
if (options.url) {
url = options.url
}
that.webviewUrl = decodeURIComponent(url);
let url = options.url + '?token=' + token + '&id=' + options.id
this.webviewUrl = decodeURIComponent(url);
console.log("11111", url, this.webviewUrl)
}
}

View File

@ -13,10 +13,10 @@
</view>
<view class="notice" v-if="notices.length">
<text>头条</text>
<text>公告</text>
<!-- -->
<swiper class="swiper" vertical="true" autoplay="true">
<swiper-item v-for="(item,index) in notices" :key="index" @click="detail(item.id)">
<swiper-item v-for="(item,index) in notices" :key="index" @click="$tools.NewsPtype(item)">
<view class='overflow'>{{item.title}}</view>
</swiper-item>
</swiper>
@ -33,7 +33,7 @@
<!-- banner -->
<view class="f_banner" v-if="banner.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in banner" :key="index" @click="detail(image.id)">
<swiper-item v-for="(image, index) in banner" :key="index" @click="$tools.NewsPtype(image)">
<image :src="image.pic" mode="aspectFill" />
</swiper-item>
</swiper>
@ -228,7 +228,7 @@
<view class="bg" @click="isCoupon=false">
<view class="edit">
<swiper class="text" autoplay="true">
<swiper-item v-for="(ite,ind) in pop" :key="ind" @click="detail(ite.id)">
<swiper-item v-for="(ite,ind) in pop" :key="ind" @click="$tools.NewsPtype(ite)">
<image :src="ite.pic" mode="aspectFill" />
<view class="bold mt-5">{{ite.title}}</view>
</swiper-item>
@ -496,12 +496,12 @@
that.notices = res.data.notice
that.banner = res.data.banner
that.pop = res.data.pop
that.isCoupon = res.data.pop.length ? false : false
that.isCoupon = res.data.pop.length ? true : false
})
},
detail(id) {
detail(ite) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + id
url: "/pageTwo/webview/webview?id=" + ite.id + '&url=' + ite.jump_url
})
},
//

View File

@ -2,8 +2,8 @@
<view class="content">
<view class="f_banner" v-if="fimages.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in fimages" :key="index" @click="detail(image)">
<image :src="image.cover_image" mode="aspectFill"/>
<swiper-item v-for="(image, index) in fimages" :key="index" @click="$tools.NewsPtype(image)">
<image :src="image.cover_image" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
@ -110,17 +110,18 @@
that.list = []
that.handleContentMsg()
},
detail(item){
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + item.id
})
detail(ite) {
this.$tools.NewsPtype(ite)
// uni.navigateTo({
// url: "/pageTwo/webview/webview?url=" + item.jump_url
// })
},
handleActive(item, ind) {
handleActive(ite, ind) {
let that = this
that.list[ind].reading++
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + item.id
})
that.$tools.NewsPtype(ite)
setTimeout(function() {
that.list[ind].reading++
}, 2000);
}
}
}

View File

@ -13,12 +13,36 @@ export default {
GetDateStr,
PrefixZero,
showModal,
NewsPtype,
compareVersions,
validatePhoneEmail,
checkPrivacyAgreement,
getBluetoothAdapter
}
function NewsPtype(con) {
// 1=外链,2=内链,3-内容
if (con.type == "wechat") {
// #ifdef APP-PLUS
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + con.id + '&url=' + con.jump_url
})
// #endif
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
appId: con.appid,
path: con.path,
extraData: {},
})
// #endif
} else if (con.type != 'wechat') {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + con.id + '&url=' + con.jump_url
})
}
}
function showModal(text) {
uni.showModal({
title: "提示",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -444,7 +444,7 @@ var render = function () {
"uni-view",
{ staticClass: _vm._$g(5, "sc"), attrs: { _i: 5 } },
[
_c("v-uni-text", { attrs: { _i: 6 } }, [_vm._v("头条")]),
_c("v-uni-text", { attrs: { _i: 6 } }, [_vm._v("公告")]),
_c(
"v-uni-swiper",
{

View File

@ -1747,7 +1747,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
}
}
@ -8790,7 +8790,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -8811,14 +8811,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick');
}
return nextTick(cb, vm)
}else{
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
@ -8914,7 +8914,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) {
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新',
JSON.stringify(diffData));
@ -11736,12 +11736,27 @@ var _default = {
GetDateStr: GetDateStr,
PrefixZero: PrefixZero,
showModal: showModal,
NewsPtype: NewsPtype,
compareVersions: compareVersions,
validatePhoneEmail: validatePhoneEmail,
checkPrivacyAgreement: checkPrivacyAgreement,
getBluetoothAdapter: getBluetoothAdapter
};
exports.default = _default;
function NewsPtype(con) {
// 1=外链,2=内链,3-内容
if (con.type == "wechat") {
uni.navigateToMiniProgram({
appId: con.appid,
path: con.path,
extraData: {}
});
} else if (con.type != 'wechat') {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + con.id + '&url=' + con.jump_url
});
}
}
function showModal(text) {
uni.showModal({
title: "提示",

View File

@ -360,7 +360,7 @@ var _default = {
time: that.regTime,
weight: that.weight,
height: that.height,
head_circumference: that.head ? that.head : 0
head_data: that.head ? that.head : 0
}).then(function (res) {
if (res.code != 0) return;
that.$tools.msg(res.msg);

View File

@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
}
},
"component": true
}

View File

@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
}
},
"component": true
}

View File

@ -152,15 +152,9 @@ var _default = {
// 页面加载时接收URL参数并解码
onLoad: function onLoad(options) {
var that = this;
var url = '';
var token = uni.getStorageSync('token');
if (options.id) {
url = "https://tc.pcxbc.com/model_content?token=" + token + '&id=' + options.id;
}
if (options.url) {
url = options.url;
}
that.webviewUrl = decodeURIComponent(url);
var url = options.url + '?token=' + token + '&id=' + options.id;
this.webviewUrl = decodeURIComponent(url);
console.log("11111", url, this.webviewUrl);
}
};

View File

@ -201,29 +201,50 @@ var render = function () {
: null
var g21 = _vm.userList.length && _vm.user.measure_model == 1
if (!_vm._isMounted) {
_vm.e0 = function ($event) {
_vm.proposalnd = 1
}
_vm.e1 = function ($event) {
_vm.proposalnd = 2
}
_vm.e2 = function ($event) {
_vm.proposalnd = 3
}
_vm.e3 = function ($event) {
_vm.proposalnd = 4
}
_vm.e4 = function ($event, item) {
_vm.e0 = function ($event, item) {
var _temp = arguments[arguments.length - 1].currentTarget.dataset,
_temp2 = _temp.eventParams || _temp["event-params"],
item = _temp2.item
var _temp, _temp2
return _vm.$Bluetooth.handleDevicesMac(item.device_determine, item.acd_id)
return _vm.$tools.NewsPtype(item)
}
_vm.e1 = function ($event, image) {
var _temp3 = arguments[arguments.length - 1].currentTarget.dataset,
_temp4 = _temp3.eventParams || _temp3["event-params"],
image = _temp4.image
var _temp3, _temp4
return _vm.$tools.NewsPtype(image)
}
_vm.e2 = function ($event) {
_vm.proposalnd = 1
}
_vm.e3 = function ($event) {
_vm.proposalnd = 2
}
_vm.e4 = function ($event) {
_vm.proposalnd = 3
}
_vm.e5 = function ($event) {
_vm.proposalnd = 4
}
_vm.e6 = function ($event, item) {
var _temp5 = arguments[arguments.length - 1].currentTarget.dataset,
_temp6 = _temp5.eventParams || _temp5["event-params"],
item = _temp6.item
var _temp5, _temp6
return _vm.$Bluetooth.handleDevicesMac(item.device_determine, item.acd_id)
}
_vm.e7 = function ($event) {
_vm.isCoupon = false
}
_vm.e6 = function ($event) {
_vm.e8 = function ($event, ite) {
var _temp7 = arguments[arguments.length - 1].currentTarget.dataset,
_temp8 = _temp7.eventParams || _temp7["event-params"],
ite = _temp8.ite
var _temp7, _temp8
return _vm.$tools.NewsPtype(ite)
}
_vm.e9 = function ($event) {
_vm.isCoupon = false
}
}
@ -530,12 +551,12 @@ var _default = {
that.notices = res.data.notice;
that.banner = res.data.banner;
that.pop = res.data.pop;
that.isCoupon = res.data.pop.length ? false : false;
that.isCoupon = res.data.pop.length ? true : false;
});
},
detail: function detail(id) {
detail: function detail(ite) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + id
url: "/pageTwo/webview/webview?id=" + ite.id + '&url=' + ite.jump_url
});
},
// 设置数据页卡片

File diff suppressed because one or more lines are too long

View File

@ -103,6 +103,15 @@ var render = function () {
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var g0 = _vm.fimages.length
if (!_vm._isMounted) {
_vm.e0 = function ($event, image) {
var _temp = arguments[arguments.length - 1].currentTarget.dataset,
_temp2 = _temp.eventParams || _temp["event-params"],
image = _temp2.image
var _temp, _temp2
return _vm.$tools.NewsPtype(image)
}
}
_vm.$mp.data = Object.assign(
{},
{
@ -217,17 +226,18 @@ var _default = {
that.list = [];
that.handleContentMsg();
},
detail: function detail(item) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + item.id
});
detail: function detail(ite) {
this.$tools.NewsPtype(ite);
// uni.navigateTo({
// url: "/pageTwo/webview/webview?url=" + item.jump_url
// })
},
handleActive: function handleActive(item, ind) {
handleActive: function handleActive(ite, ind) {
var that = this;
that.list[ind].reading++;
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + item.id
});
that.$tools.NewsPtype(ite);
setTimeout(function () {
that.list[ind].reading++;
}, 2000);
}
}
};

View File

@ -1 +1 @@
<view class="content"><block wx:if="{{$root.g0}}"><view class="f_banner"><swiper class="swiper" indicator-dots="true" autoplay="true"><block wx:for="{{fimages}}" wx:for-item="image" wx:for-index="index" wx:key="index"><swiper-item data-event-opts="{{[['tap',[['detail',['$0'],[[['fimages','',index]]]]]]]}}" bindtap="__e"><image src="{{image.cover_image}}" mode="aspectFill"></image></swiper-item></block></swiper></view></block><view class="tabbar"><scroll-view class="scroll-menu" style="white-space:nowrap;" scroll-x="true"><block wx:for="{{labelList}}" wx:for-item="name" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleactive',[index]]]]]}}" class="{{[active==index?'active':'']}}" bindtap="__e">{{''+name.name+''}}</view></block></scroll-view></view><view class="list"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleActive',['$0',index],[[['list','',index]]]]]]]}}" class="newslist" bindtap="__e"><view class="left"><view class="title">{{''+item.title+''}}</view></view><view class="right"><image src="{{item.cover_image}}" mode="aspectFill"></image></view><view class="time"><view class="size14 c999"><icon class="iconfont icon-icon-test"></icon>{{''+item.reading+'次浏览'}}</view><view class="size14 c999"><icon class="iconfont icon-icon-test1"></icon>{{''+item.create_time+''}}</view></view></view></block></view></view>
<view class="content"><block wx:if="{{$root.g0}}"><view class="f_banner"><swiper class="swiper" indicator-dots="true" autoplay="true"><block wx:for="{{fimages}}" wx:for-item="image" wx:for-index="index" wx:key="index"><swiper-item data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" data-event-params="{{({image})}}" bindtap="__e"><image src="{{image.cover_image}}" mode="aspectFill"></image></swiper-item></block></swiper></view></block><view class="tabbar"><scroll-view class="scroll-menu" style="white-space:nowrap;" scroll-x="true"><block wx:for="{{labelList}}" wx:for-item="name" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleactive',[index]]]]]}}" class="{{[active==index?'active':'']}}" bindtap="__e">{{''+name.name+''}}</view></block></scroll-view></view><view class="list"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['handleActive',['$0',index],[[['list','',index]]]]]]]}}" class="newslist" bindtap="__e"><view class="left"><view class="title">{{''+item.title+''}}</view></view><view class="right"><image src="{{item.cover_image}}" mode="aspectFill"></image></view><view class="time"><view class="size14 c999"><icon class="iconfont icon-icon-test"></icon>{{''+item.reading+'次浏览'}}</view><view class="size14 c999"><icon class="iconfont icon-icon-test1"></icon>{{''+item.create_time+''}}</view></view></view></block></view></view>