Browse Source

1.0end

master
kola-web 2 days ago
parent
commit
9bbf119531
  1. 11
      project.private.config.json
  2. 2
      src/doc/pages/doc1/index.json
  3. 2
      src/doc/pages/doc1/index.ts
  4. BIN
      src/images/bg9.png
  5. 7
      src/pages/home/index.ts
  6. 4
      src/pages/home/index.wxml
  7. 21
      src/pages/informationDetail/index.ts
  8. 63
      src/pages/login/index.ts
  9. 2
      src/utils/page.ts

11
project.private.config.json

@ -23,13 +23,20 @@ @@ -23,13 +23,20 @@
"miniprogram": {
"list": [
{
"name": "首页",
"pathName": "pages/home/index",
"name": "隐私协议",
"pathName": "doc/pages/doc1/index",
"query": "",
"scene": null,
"launchMode": "default"
},
{
"name": "首页",
"pathName": "pages/home/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "资料库详情",
"pathName": "pages/informationDetail/index",
"query": "",

2
src/doc/pages/doc1/index.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"navigationStyle": "default",
"navigationBarTitleText": "TED关爱中心小程序隐私政策",
"navigationBarTitleText": "隐私协议",
"usingComponents": {
"mp-html": "mp-html"
}

2
src/doc/pages/doc1/index.ts

File diff suppressed because one or more lines are too long

BIN
src/images/bg9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 158 KiB

7
src/pages/home/index.ts

@ -113,13 +113,14 @@ Page({ @@ -113,13 +113,14 @@ Page({
},
handleSwiperChange(e) {
const current = e.detail.current;
this.setData({
current: e.detail.current,
});
const { Id } = this.data.notice[current] || {};
if (Id) {
app.mpBehavior({ PositionId: '4', OperateType: '4', OperateId: Id });
}
this.setData({
current: e.detail.current,
});
},
getBanner() {
wx.ajax({

4
src/pages/home/index.wxml

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<image class="e-img" src="{{imageUrl}}card1.png?t={{Timestamp}}"></image>
</view>
<view class="notice">
<swiper class="v-swiper" current="{{current}}" autoplay bind:change="handleSwiperChange">
<swiper class="v-swiper" autoplay bind:change="handleSwiperChange">
<swiper-item
class="swiper-item"
wx:for="{{notice}}"
@ -136,7 +136,7 @@ @@ -136,7 +136,7 @@
</view>
</view>
</view>
<view class="ad">
<view class="ad" wx:if="{{bannerList.length > 0}}">
<swiper
class="swiper"
autoplay

21
src/pages/informationDetail/index.ts

@ -10,6 +10,8 @@ Page({ @@ -10,6 +10,8 @@ Page({
position: 'bottom',
} as any,
Timestamp: '',
doc: '1',
id: '',
@ -115,17 +117,14 @@ Page({ @@ -115,17 +117,14 @@ Page({
},
});
},
onShareAppMessage(e) {
if (e.from === 'button') {
const { Title, CoverImgUrl, Id } = this.data.detail;
app.mpBehavior({ PositionId: '3', OperateType: '3', OperateId: Id });
return {
title: Title,
path: `/pages/informationDetail/index?id=${Id}`,
imageUrl: CoverImgUrl,
};
}
return {};
onShareAppMessage() {
const { Title, CoverImgUrl, Id } = this.data.detail;
app.mpBehavior({ PositionId: '1', OperateType: '3', OperateId: Id as string });
return {
title: Title,
path: `/pages/informationDetail/index?id=${Id}`,
imageUrl: CoverImgUrl,
};
},
});

63
src/pages/login/index.ts

@ -109,14 +109,15 @@ Page({ @@ -109,14 +109,15 @@ Page({
.then((res) => {
this.submitCallback(res);
})
.catch(() => {
this.setData({
popupShow: true,
popupType: 'popup4',
popupParams: {
close: true,
},
});
.catch((err) => {
if (err.data.code == 100) {
this.handleShowPopup();
} else if (err.data.msg) {
wx.showToast({
title: err.data.msg,
icon: 'none',
});
}
});
},
handleWxSubmit(e: WechatMiniprogram.CustomEvent) {
@ -134,14 +135,15 @@ Page({ @@ -134,14 +135,15 @@ Page({
.then((res) => {
this.submitCallback(res);
})
.catch(() => {
this.setData({
popupShow: true,
popupType: 'popup4',
popupParams: {
close: true,
},
});
.catch((err) => {
if (err.data.code == 100) {
this.handleShowPopup();
} else if (err.data.msg) {
wx.showToast({
title: err.data.msg,
icon: 'none',
});
}
});
}
},
@ -149,20 +151,27 @@ Page({ @@ -149,20 +151,27 @@ Page({
console.log('DEBUGPRINT[79]: index.ts:112: res=', res);
app.globalData.loginType = res.loginType;
app.globalData.isLogin = res.isLogin;
if (res.isLogin == 1 && res.loginType == 2) {
wx.reLaunch({
url: '/pages/home/index',
});
if (res.isLogin == 1) {
if (res.loginType == 2) {
wx.reLaunch({
url: '/pages/home/index',
});
} else {
this.handleShowPopup();
}
} else {
this.setData({
popupShow: true,
popupType: 'popup4',
popupParams: {
close: true,
},
});
this.handleShowPopup();
}
},
handleShowPopup() {
this.setData({
popupShow: true,
popupType: 'popup4',
popupParams: {
close: true,
},
});
},
handleShowTel() {
this.setData({
showTel: !this.data.showTel,

2
src/utils/page.ts

@ -60,7 +60,7 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje @@ -60,7 +60,7 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje
url = 'pages/start/index';
}
return {
title: '甲状腺眼病TED规范化诊治中心',
title: 'TED规范化诊治中心',
path: url,
imageUrl: `${getApp().globalData.imageUrl}share.png?t=${Timestamp}`,
};

Loading…
Cancel
Save