Commit 803bf593 by 李静静

1.学习群可配置

2.添加联系我插件
parent d29c5dd7
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
"chatGroupPlugin": { "chatGroupPlugin": {
"version": "1.0.5", "version": "1.0.5",
"provider": "wx4d2deeab3aed6e5a" "provider": "wx4d2deeab3aed6e5a"
},
"contactPlugin": {
"version": "1.4.4",
"provider": "wx104a1a20c3f81ec2"
} }
}, },
"window": { "window": {
......
...@@ -12,25 +12,25 @@ Page({ ...@@ -12,25 +12,25 @@ Page({
v1 = v1.split('.') v1 = v1.split('.')
v2 = v2.split('.') v2 = v2.split('.')
const len = Math.max(v1.length, v2.length) const len = Math.max(v1.length, v2.length)
while (v1.length < len) { while (v1.length < len) {
v1.push('0') v1.push('0')
} }
while (v2.length < len) { while (v2.length < len) {
v2.push('0') v2.push('0')
} }
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i]) const num1 = parseInt(v1[i])
const num2 = parseInt(v2[i]) const num2 = parseInt(v2[i])
if (num1 > num2) { if (num1 > num2) {
return 1 return 1
} else if (num1 < num2) { } else if (num1 < num2) {
return -1 return -1
} }
} }
return 0 return 0
}, },
calVersion:function(){ calVersion:function(){
...@@ -72,7 +72,7 @@ Page({ ...@@ -72,7 +72,7 @@ Page({
this.setData({ this.setData({
modal:true modal:true
}) })
}, },
getGroupList:function(){ getGroupList:function(){
console.log(request) console.log(request)
...@@ -83,7 +83,10 @@ Page({ ...@@ -83,7 +83,10 @@ Page({
if(res.data&&res.data.code===0){ if(res.data&&res.data.code===0){
console.log(res.data.data.list) console.log(res.data.data.list)
this.setData({ this.setData({
group_list:res.data.data.list group_list:res.data.data.list,
picture_list:res.data.data.picture_list,
text:res.data.data.text,
btn_pic:res.data.data.btn_pic,
}) })
} }
} }
......
{ {
"usingComponents": { "usingComponents": {
"cell": "plugin://chatGroupPlugin/cell" "chatGroupCell": "plugin://chatGroupPlugin/cell",
"contactCell": "plugin://contactPlugin/cell"
} }
} }
\ No newline at end of file
<!--index.wxml--> <!--index.wxml-->
<view class="container"> <view class="container">
<view class="header"> <!-- <view class="header">
<image src="../../images/logo.png" class="logo"/> <image src="../../images/logo.png" class="logo"/>
</view> </view> -->
<view class="content"> <!-- <view class="content">
<view class="content-h3">在专属社群你可以获得:</view> <view class="content-h3">在专属社群你可以获得:</view>
<view class="content-item"> <view class="content-item">
...@@ -38,16 +38,25 @@ ...@@ -38,16 +38,25 @@
<text class="content-p">群内特设每日一题,相互讨论,共同进步。</text> <text class="content-p">群内特设每日一题,相互讨论,共同进步。</text>
</view> </view>
</view> </view>
</view> -->
<view class="img_list">
<image
wx:for="{{picture_list}}"
src="{{item.url}}"
class="img_item"
style="height:{{item.height}}rpx"
></image>
</view> </view>
<view class="join-btn" bindtap="showModal"> <view wx:if="{{btn_pic}}" class="join-btn" bindtap="showModal">
<image src="../../images/Button_Background@2x.png" class="join-btn-bg"/> <image src="{{btn_pic.url}}" class="join-btn-bg" />
<view class="join-btn-text" >加入专属备考群</view> <!-- <view class="join-btn-text" >加入专属备考群</view> -->
</view> </view>
<view wx:if="{{modal}}" class="modal" > <view wx:if="{{modal}}" class="modal" >
<view class="modal-content"> <view class="modal-content">
<view class="modal-close" bindtap="modalClose"></view> <view class="modal-close" bindtap="modalClose"></view>
<view class="modal-h4">请选择你的备考状态</view> <view class="modal-h4">{{text}}</view>
<view wx:if="{{isLowerVersion}}" class="modal-version-tips"> <view wx:if="{{isLowerVersion}}" class="modal-version-tips">
<view>检测到你的微信版本过低,可能造成无法加群,</view> <view>检测到你的微信版本过低,可能造成无法加群,</view>
<view>建议升级微信最新版本</view> <view>建议升级微信最新版本</view>
...@@ -64,12 +73,19 @@ ...@@ -64,12 +73,19 @@
<!-- url='https://work.weixin.qq.com/gm/24e84fe11d990cd99fa67ccd99f1aa4b' <!-- url='https://work.weixin.qq.com/gm/24e84fe11d990cd99fa67ccd99f1aa4b'
url='https://work.weixin.qq.com/gm/{{item.uniq_code}}' url='https://work.weixin.qq.com/gm/{{item.uniq_code}}'
--> -->
<cell <chatGroupCell
paddingStyle="80" paddingStyle="80"
wx:if="{{item.type===1}}"
url='{{item.uniq_code}}' url='{{item.uniq_code}}'
bind:startmessage="startmessage" bind:startmessage="startmessage"
bind:completemessage="completemessage" bind:completemessage="completemessage"
/> />
<contactCell
paddingStyle="80"
wx:if="{{item.type===2}}"
plugid='{{item.uniq_code}}'
/>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
......
/**index.wxss**/ /**index.wxss**/
.header{ /* .header{
box-sizing: border-box; box-sizing: border-box;
padding-top: 80rpx; padding-top: 80rpx;
width: 100%; width: 100%;
...@@ -61,17 +61,27 @@ ...@@ -61,17 +61,27 @@
line-height:36rpx; line-height:36rpx;
color:#999; color:#999;
} }
*/
.img_list{
width: 100%;
padding-bottom: 176rpx;
}
.img_item{
display: block;
width: 100%;
}
.join-btn{ .join-btn{
position: fixed; position: fixed;
left:0; left:0;
bottom:0; bottom:0;
width: 100%; width: 100%;
height:176rpx;
line-height: 176rpx; line-height: 176rpx;
text-align: center; text-align: center;
color:#fff; color:#fff;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
z-index: 1; z-index: 5;
} }
.join-btn-bg{ .join-btn-bg{
position: absolute; position: absolute;
...@@ -85,12 +95,12 @@ ...@@ -85,12 +95,12 @@
} }
/* modal */ /* modal */
.modal{ .modal{
position: absolute; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 2; z-index: 6;
background:rgba(0, 0, 0, 0.4); background:rgba(0, 0, 0, 0.4);
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
......
//const host='http://ljj.dev.neoteched.com' //开发 const host='http://ljj.dev.neoteched.com' //开发
const host='https://winterfell-alpha.neoteched.com' //测试 //const host='https://winterfell-alpha.neoteched.com' //测试
//const host='https://sk2.shenlancity.com' //线上
export const request=({url,method,header,success,fail})=>{ export const request=({url,method,header,success,fail})=>{
if(!url){ if(!url){
console.error('url不能为空') console.error('url不能为空')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment