作者 lihongjuan

中面提交

要显示太多修改。

为保证性能只显示 31 of 31+ 个文件。

... ... @@ -8,7 +8,7 @@
},
post: function(url, data, method) {
// (showLoad == undefined || showLoad) ?
// wx.showLoading({
// title: '加载中',
... ... @@ -20,11 +20,9 @@
token = uni.getStorageSync('token'),
header = {
token: token || '',
},
postData;
console.log(header)
// console.log(token,"token")
//网络请求
uni.request({
... ... @@ -106,8 +104,11 @@
});
return promise;
},
globalData: {
userInfo: null,
version:'v1.0.7',
// baseUrl: 'http://zhongmian.w.brotop.cn/api/',
// imgurl:'http://zhongmian.w.brotop.cn/'
baseUrl: 'https://app.chinesenooddles.com/api/',
... ... @@ -478,13 +479,15 @@
/* 新版本 */
.banbenwrap {
width: 522rpx;
height: 730rpx;
/* height: 730rpx; */
background: rgba(255, 255, 255, 1);
border-radius: 24rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding-bottom: 32rpx;
box-sizing: border-box;
}
.banbenimg {
... ... @@ -829,7 +832,7 @@
/* 购买弹层 */
.buywrap {
width: 750rpx;
height: 746rpx;
/* height: 746rpx; */
background: #fff;
position: absolute;
bottom: 0;
... ...
... ... @@ -3,14 +3,31 @@
height: 180rpx;
border-radius: 50%;
font-size: 0;
margin: 88rpx auto 0;
margin: 18rpx auto 0;
}
.logo image{
.logo image {
border-radius: 50%;
}
.dengluleft {
color: #f7c51b;
font-size: 40rpx;
font-weight: bold;
}
.denglubtn {
width:100%;
padding: 0 200rpx;
box-sizing: border-box;
position: absolute;
top: 30rpx;
left: 0
}
.loginbox{
.loginbox {
padding: 0 42rpx;
box-sizing: border-box;
margin-top: 144rpx;
... ... @@ -21,8 +38,9 @@
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.inputk{
width:600rpx;
.inputk {
width: 530rpx;
}
.boxitemleft {
... ... @@ -84,7 +102,7 @@
align-items: center;
font-size: 28rpx;
color: #5A5D62;
margin-top: 100rpx;
margin-top: 20rpx;
}
.title::before,
... ... @@ -104,7 +122,7 @@
}
.btnbottom {
width: 600rpx;
height: 80rpx;
color: #5A5D62;
... ... @@ -116,214 +134,286 @@
margin: 26rpx auto 0;
}
.loginimg {
width: 90rpx;
height: 90rpx;
}
.lgoinboxkk {
padding: 0 80rpx;
box-sizing: border-box;
margin-top: 40rpx
}
.btnimgwei {
width: 48rpx;
height: 42rpx;
height: 48rpx;
font-size: 0;
position: absolute;
top: 16rpx;
left: 32rpx;
margin-top:5rpx;
margin-top: 5rpx;
}
.password{
margin-top:30rpx;
.password {
margin-top: 30rpx;
}
.passwordleft {
color: #169BD5;
font-size: 28rpx;
color: gray;
font-size: 30rpx;
}
.zhucename {
color: #bc9047
}
.shuxian {
color:#169BD5;
color: #169BD5;
font-size: 28rpx;
margin-right:18rpx;
margin-bottom:2rpx;
margin-right: 18rpx;
margin-bottom: 2rpx;
/* margin:0 20rpx; */
}
.loginwrap{
width:540rpx;
height:364rpx;
.loginwrap {
width: 540rpx;
height: 364rpx;
border-radius: 10rpx;
background: #fff;
position:absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%)
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%)
}
.tip{
color:#06121E;
.tip {
color: #06121E;
font-size: 36rpx;
margin-top:56rpx;
margin-top: 56rpx;
text-align: center;
}
.zhanghaoone{
color:#06121E;
.zhanghaoone {
color: #06121E;
font-size: 28rpx;
margin-top:56rpx;
margin-top: 56rpx;
text-align: center;
}
.zhanghaotwo{
color:#06121E;
.zhanghaotwo {
color: #06121E;
font-size: 28rpx;
text-align: center;
}
.tipbtn{
width:540rpx;
height:89rpx;
.tipbtn {
width: 540rpx;
height: 89rpx;
position: absolute;
bottom:0;
left:0;
border-top:1rpx solid #E3E3E3;
bottom: 0;
left: 0;
border-top: 1rpx solid #E3E3E3;
}
.tipbtnleft{
color:#666666;
.tipbtnleft {
color: #666666;
font-size: 30rpx;
width:272rpx;
height:84rpx;
width: 272rpx;
height: 84rpx;
text-align: center;
line-height: 84rpx;
border-right:1rpx solid #f5f5f5;
border-right: 1rpx solid #f5f5f5;
}
.tipbtnright{
color:#FF9417;
.tipbtnright {
color: #FF9417;
font-size: 30rpx;
width:272rpx;
height:84rpx;
width: 272rpx;
height: 84rpx;
text-align: center;
line-height: 84rpx;
}
.logoname {
color: #f7c51b;
font-size: 40rpx;
text-align: center;
margin-top: 20rpx
}
/* 短信验证 */
.shortyanzheng{
width:180rpx;
height:60rpx;
background:rgba(249,249,249,1);
border-radius:4rpx;
border:2rpx solid rgba(238,238,238,1);
color:#5B5E64;
font-size:28rpx;
.shortyanzheng {
width: 180rpx;
height: 60rpx;
background: rgba(249, 249, 249, 1);
border-radius: 4rpx;
border: 2rpx solid rgba(238, 238, 238, 1);
color: #5B5E64;
font-size: 28rpx;
text-align: center;
padding: 10rpx 22rpx;
box-sizing: border-box;
letter-spacing: 10rpx;
}
.loginbtn{
width:686rpx;
height:88rpx;
color:#FEFEFE;
font-size: 32rpx;
.loginbtnbtn {
width: 586rpx;
height: 100rpx;
color: #FEFEFE;
font-size: 38rpx;
text-align: center;
line-height: 88rpx;
margin:0 auto;
margin: 52rpx auto 0;
border-radius: 88rpx;
background: linear-gradient(127deg, rgba(193, 149, 76, 1) 0%, rgba(204, 179, 99, 1) 100%);
}
.loginone {
width: 750rpx;
height: 1000rpx;
font-size: 0;
position: relative;
margin-top: 20rpx
}
.loginboxmima{
margin-top:48rpx;
.loginboxbox {
position: absolute;
left: 34rpx;
top: 0rpx
}
.loginboxmima {
margin-top: 48rpx;
}
.bangdingmima{
color:#3D454C;
.bangdingmima {
color: #3D454C;
font-size: 28rpx;
margin-bottom:36rpx;
}
.registerbot{
width:662rpx;
position:fixed;
left:0;
bottom:0;
display:flex;
margin-bottom: 36rpx;
}
.registerbot {
width: 662rpx;
position: fixed;
left: 0;
bottom: 0;
display: flex;
flex-direction: column;
justify-content: center;
left:34rpx;
bottom:14rpx
left: 34rpx;
bottom: 14rpx
}
.wordregister{
margin-bottom:22rpx
.wordregister {
margin-bottom: 22rpx
}
.setpassword{
.setpassword {
padding: 32rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.setpasswordleft{
width:120rpx;
color:#3D454C;
.setmimamima{
width:686rpx;
padding: 32rpx;
box-sizing: border-box;
}
.setpasswordleft {
width: 120rpx;
color: #3D454C;
font-size: 28rpx;
}
.setpasswordright{
width:435rpx;
color:#BDC4CE;
.setpasswordright {
width: 435rpx;
color: #BDC4CE;
font-size: 28rpx;
margin-left:20rpx;
margin-left: 20rpx;
}
.setpasswordright input{
.setpasswordright input {
font-size: 28rpx;
}
.finish{
position:fixed;
bottom:14rpx;
left:32rpx;
.finish {
position: fixed;
bottom: 14rpx;
left: 32rpx;
}
.yanzheng{
color:#5A5D62;
.yanzheng {
color: #5A5D62;
font-size: 28rpx;
text-align: center;
}
.yanzhengphone{
margin-top:16rpx;
.yanzhengphone {
margin-top: 16rpx;
}
.entercode{
.entercode {
/* width:400rpx;
height:84rpx;
border-radius:4rpx;
font-size: 0;
margin:16rpx auto 0; */
}
.entercode input{
width:400rpx;
height:84rpx;
margin:16rpx auto 0;
background:rgba(249,249,249,1);
border-radius:4rpx;
.entercode input {
width: 400rpx;
height: 84rpx;
margin: 16rpx auto 0;
background: rgba(249, 249, 249, 1);
border-radius: 4rpx;
/* height:84rpx; */
color:#BDC4CE;
color: #BDC4CE;
font-size: 28rpx;
/* padding: 22rpx; */
/* box-sizing: border-box; */
text-align: center;
}
.entercode{
color:#BDC4CE;
.entercode {
color: #BDC4CE;
font-size: 28rpx;
}
.reenter{
color:#AE9368;
.reenter {
color: #AE9368;
font-size: 28rpx;
margin-top:38rpx;
margin-top: 38rpx;
text-align: center;
}
/* 用户协议 */
.xieyitext{
color:#232323;
.xieyitext {
color: #232323;
font-size: 28rpx;
padding: 32rpx;
box-sizing: border-box;
}
.phonecode{
color:#169BD5;
font-size:28rpx;
.phonecode {
color: #169BD5;
font-size: 28rpx;
text-align: center;
margin-top:36rpx;
margin-top: 36rpx;
}
.rightbtn {
position: fixed;
bottom: 14rpx;
left: 32rpx;
}
.rightbtn{
position:fixed;
bottom:14rpx;
left:32rpx;
}
\ No newline at end of file
... ...
... ... @@ -533,10 +533,18 @@
}
.detailnum {
width:100rpx;
color: #5B5E64;
font-size: 28rpx;
margin: 0 26rpx;
}
.detailnum input{
width:100%;
height:100%;
color:#999;
font-size: 28rpx;
text-align: center;
}
.addcarbtnkleft {
width: 328rpx;
... ...
... ... @@ -2,8 +2,8 @@
"name" : "中国面条",
"appid" : "__UNI__86EF000",
"description" : "中国面条",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.1.0",
"versionCode" : 134,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
... ... @@ -15,6 +15,9 @@
"autoclose" : true,
"delay" : 0
},
"compatible" : {
"ignoreVersion" : true
},
/* 模块配置 */
"modules" : {
"Payment" : {},
... ... @@ -47,21 +50,17 @@
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_SMS\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
... ... @@ -74,6 +73,14 @@
"entitlements" : {
"com.apple.developer.associated-domains" : [ "applinks:app.chinesenooddles.com" ]
}
},
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "中国面条想要使用相册来进行用户头像选取,您同意我们访问你的相册吗?",
"NSPhotoLibraryAddUsageDescription" : "中国面条想要使用相册来进行用户头像选取,您同意我们访问你的相册吗?",
"NSCameraUsageDescription" : "中国面条想要使用相机来进行用户头像选取,您同意我们访问你的相机吗?",
"NSLocationWhenInUseUsageDescription" : "中国面条想要使用定位来为您推荐更加精准的面馆信息,您同意我们访问你的定位吗?",
"NSLocationAlwaysUsageDescription" : "中国面条想要使用定位来为您推荐更加精准的面馆信息,您同意我们访问你的定位吗?",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "中国面条想要使用定位来为您推荐更加精准的面馆信息,您同意我们访问你的定位吗?"
}
},
/* SDK配置 */
... ... @@ -150,6 +157,9 @@
"parameters" : {}
}
}
},
"uniStatistics" : {
"enable" : false
}
},
/* 快应用特有相关 */
... ...
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/homepage/homepage",
"style": {
... ... @@ -14,8 +13,49 @@
}
}
},
{
"path": "pages/luntan/tousuweiquan",
"style": {
"navigationBarTitleText": "投诉维权",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/luntan/tousudetail",
"style": {
"navigationBarTitleText": "投诉维权",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/luntan/zhongmianzixun",
"style": {
"navigationBarTitleText": "中面资讯",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/luntan/zhongmianzixundetail",
"style": {
"navigationBarTitleText": "中面咨讯",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/luntan/zhongmianzizhi",
"style": {
"navigationBarTitleText": "中面资质",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/homepage/giftorder",
"style": {
"navigationBarTitleText": "",
... ...
<template>
<view class="content">
<view class="xieyitext">
活动规则
<view class='textline'>
1. 用户进入抽奖专区进行抽奖;
</view>
<view class='textline'>
2. 用户下单成功后即可获得1次大转盘抽奖机会;
</view>
<view class='textline'>
3. 每人每天不限抽奖次数;
</view>
<view class='textline'>
4. 奖品会在审核通过后25个工作日内,由中面集团统一完成发放;
</view>
<view class='textline'>
5. 奖品均为实物类奖品,中奖用户需填写收件人姓名、手机号以及收货地址;如不填写,实为中奖用户放弃中奖资格;
</view>
<view class='textline'>
6. 有任何疑问或障碍可直接拨打 400-0230-777;
</view>
<view>
<view class='textline' >
7. 中面集团在法律允许范围内,拥有对本次活动的最终解释权。
</view>
<view class='textline' v-if="openclose==2">
8. 所有奖品与苹果公司无关,苹果不是赞助商
</view>
</view>
</view>
</view>
... ... @@ -12,17 +42,39 @@
export default {
data() {
return {
openclose:''
}
},
onLoad(options) {
this.getkaiguan()
},
methods: {}
methods: {
// 获取开关
getkaiguan() {
let that = this;
var url = 'page/get_switch';
var params = {
}
app.post(url, params).then((res) => {
console.log(res.data.data.switch);
that.openclose=res.data.data.switch;
console.log('43783488949348',that.openclose)
}).catch((err) => {
})
},
}
}
</script>
<style>
@import url('../../base/login');
.textline{
margin-bottom: 20rpx;
}
</style>
... ...
... ... @@ -7,8 +7,6 @@
<uni-swipe-action v-else>
<uni-swipe-action-item v-for="(item,index) in swipeList" :options="item.options" :key="item.id" @change="swipeChange"
@click="swipeClick($event,index,)">
<!-- <text class="cont">{{item.content}}</text> -->
<!-- @click="swipeClick($event,index)" -->
<view class="searchshop commnonpadding" @click.stop="shopdetail" :data-id="item.store_id">
<view class="searchgooditem flex boxsizing">
<view class="shopleftimg">
... ... @@ -176,10 +174,6 @@
}).catch((err) => {
console.log(err)
})
}
}
}
... ...
... ... @@ -17,7 +17,6 @@
活动规则
</view>
</view>
<!-- 停止位置:<input :value='luckPosition' style="width:100%;text-align:center" @input='input' type='number'></input> -->
<!-- 抽奖 -->
<view class='frame_view' v-if="tab==1">
<view class='frame_row'>
... ... @@ -64,7 +63,7 @@
<view class="right">立即</view>
<view class="right rightchou">抽奖</view>
</view>
<!-- <image class='frame_item' :src='btnconfirm' @click="clickLucks()"></image> -->
<view class='frame_item frame_item3' :style='{"opacity":color[3].opa}'>
<view class="img">
... ... @@ -113,27 +112,7 @@
<image src="../../static/bandan.png" mode="" v-if="item.chose==true"></image>
<image src="../../static/zhengdan.png" mode="" v-else></image>
</view>
<!-- <view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view>
<view class="eggimg">
<image src="../../static/zhengdan.png" mode=""></image>
</view> -->
</view>
<view class="everytime">每次砸金蛋将消耗5积分</view>
</view>
... ... @@ -302,7 +281,7 @@
value.chose=false
})
that.color=gift;
// that.chou()
}).catch((err) => {
... ... @@ -323,10 +302,7 @@
title:'恭喜砸中'+item.name,
icon:'none'
})
// uni.showToast({
// title:'恭喜砸中'+item.name,
// icon:none
// })
}).catch((err) => {
})
... ... @@ -430,44 +406,7 @@
})
}
//中奖
// uni.showModal({
// content: '恭喜获得:' + e.color[which].name,
// showCancel: false,
// confirmColor: "#F8C219",
// success: res => {
// if (res.confirm) {
// //设置按钮可以点击
// e.btnconfirm = '../../static/sherpa-jiugonggedianjichoujiang.png';
// e.clickLuck = 'clickLuck';
// e.loadAnimation();
// }
// },
// fail: () => {},
// complete: () => {}
// });
// else {
// //未中奖
// uni.showModal({
// content: '很遗憾未中奖',
// showCancel: false,
// confirmColor: "#F8C219",
// success: res => {
// if (res.confirm) {
// //设置按钮可以点击
// e.btnconfirm = '../../static/sherpa-jiugonggedianjichoujiang.png';
// e.clickLuck = 'clickLuck';
// e.loadAnimation();
// }
// },
// fail: () => {},
// complete: () => {}
// });
// }
}, 1000);
}
}, time);
... ...
... ... @@ -362,11 +362,7 @@
console.log(res);
console.log(res.data.data);
that.goodinfo=res.data.data
// let seldata = JSON.stringify(that.data)
// uni.setStorageSync("goodinfo", res.data.data);
// uni.navigateTo({
// url: '/pages/nearshop/sureorder?seldata=' + seldata
// })
}).catch((err) => {
console.log(err)
... ... @@ -413,9 +409,7 @@
console.log(res);
that.order_gift_id=res.data.data.order_gift_id;
that.paymoney()
// uni.navigateTo({
// url:'/pages/nearshop/sureorder'
// })
}).catch((err) => {
console.log(err)
... ... @@ -429,11 +423,6 @@
// 支付接口
paymoney(){
let that = this;
// if(that.pay_type == 2) {
// }
var url = 'gift/pay';
var params = {
order_gift_id:that.order_gift_id
... ...
... ... @@ -26,9 +26,7 @@
</view>
</view>
<view class="homehead">
<!-- <view class="headtopimg">
<image src="../../static/headtop.png" mode=""></image>
</view> -->
<view class="swiper_image">
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" class="swiper_item_img"
... ... @@ -144,19 +142,14 @@
<view class="banbenbox">
<view class="banbentitle">发现新版本</view>
<view class="banbox">
<view class="banbennum">版本号:1.44</view>
<view class="banbennum">文件大小:2.84M</view>
<view class="banbennum">版本号:{{version}}</view>
<!-- <view class="banbennum">文件大小:2.84M</view> -->
</view>
<view class="renew">更新内容:</view>
<view class="banbox banbentwo">
<view class="banbennum">1.优化UI,提升用户体验</view>
<view class="banbennum">2.新增打卡签到功能</view>
</view>
</view>
<view class="banbenbot flextwo">
<view class="banbenbotleft">暂不更新</view>
<view class="banebnbotright">立即更新</view>
<view class="banbenbotleft" @click="norenew">暂不更新</view>
<view class="banebnbotright" @click="newbanben">立即更新</view>
</view>
<view class="chahao" @click="hidebanben">
<image src="../../static/chahao.png" mode=""></image>
... ... @@ -185,34 +178,8 @@
<!-- @click="tabClick" -->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- 底部导航 -->
<!-- <view class="teacherfooter">
<view class="teacherfootitem" @click="selnav" :data-id="1">
<view class="teacherfootitemtop shou">
<image :src="footersel==1?'../../static/indexactive.png':'../../static/index.png'"></image>
</view>
<view class="teacherfootname " :class="footersel==1?'activename':''">首页</view>
</view>
<view class="teacherfootitem" @click="selnav" :data-id="2">
<view class="teacherfootitemtop shou">
<image :src="footersel==2?'../../static/nearshopactive.png':'../../static/nearshop.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'activename':''">附近店铺</view>
</view>
<view class="teacherfootitem" @click="selnav" :data-id="3">
<view class="teacherfootitemtop shou">
<image :src="footersel==3?'../../static/luntanctive.png':'../../static/luntan.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==3?'activename':''">中面论坛</view>
</view>
<view class="teacherfootitem" @click="selnav" :data-id="4">
<view class="teacherfootitemtop shou">
<image :src="footersel==4?'../../static/useractive.png':'../../static/user.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==4?'activename':''">个人中心</view>
</view>
</view>
-->
</view>
</template>
<script>
... ... @@ -246,18 +213,66 @@
interval: 4000,
duration: 3000,
currentSwiper: 0,
hotline: ''
hotline: '',
version:"",
openfile:'',
}
},
onLoad() {
uni.setStorageSync("newprovincename","")
this.version=app.globalData.version
this.getfoodlist();
// uni.setStorageSync("token","")
this.getbanner();
// 检查版本更新
this.checkversion()
},
methods: {
// 检查版本更新
checkversion(){
console.log(8999999999)
let that = this;
var url = 'sundry/get_versions';
var params = {
//versions_number:'19.22.33',
versions_number:app.globalData.version
}
console.log(params,'3489738497478')
app.post(url, params).then((res) => {
console.log('3489893',res)
if(res.data.data!=null){
that.showbanben=true
that.version=res.data.data.versions_number;
that.openfile=res.data.data.file
}
}).catch((err) => {
console.log(err,7777)
})
},
// 暂不更新
norenew(){
this.showbanben=false
},
newbanben(){
let that=this;
if(uni.getSystemInfoSync().platform == 'ios'){
let url='https://apps.apple.com/cn/app/%E4%B8%AD%E5%9B%BD%E9%9D%A2%E6%9D%A1/id1518512451'
plus.runtime.openURL(url);
}else if(uni.getSystemInfoSync().platform == 'android'){
let url=that.openfile
plus.runtime.openURL(url);
}
},
// 扫一扫
scan(){
uni.scanCode({
... ... @@ -278,6 +293,7 @@
// let url=res.
});
},
// 获取加盟热线
gethotline() {
let that = this;
... ... @@ -511,6 +527,9 @@
url: '/pages/login/loginindex?type=1'
})
} else {
uni.setStorageSync("oldpirce",'')
uni.setStorageSync("oldpirce1",'')
uni.setStorageSync("oldpirce2",'')
uni.navigateTo({
url: '/pages/nearshop/cartlist'
})
... ... @@ -564,6 +583,7 @@
let id = e.currentTarget.dataset.id;
// type 1 面访商品
uni.navigateTo({
url: '/pages/nearshop/goodtail?id=' + id + '&type=' + 1
})
},
... ...
... ... @@ -150,9 +150,7 @@
}
},
onShow:function(){
// let pages = getCurrentPages();
// let currPage = pages[pages.length - 1]; //当前页面
// this.score_category_id = currPage.data.selectId==undefined?'':currPage.data.selectId;
// 从上一页带数据
this.score_category_id=uni.getStorageSync("selectId")!=''?uni.getStorageSync("selectId"):''
this.shoplist=[];
this.page=1;
... ...
... ... @@ -60,13 +60,18 @@
uni.showLoading({
title: '加载中'
})
// https://geo.datav.aliyun.com/areas/bound/100000_full.json
// https://geo.datav.aliyun.com/areas_v2/bound/100000_full.json
// https://geo.datav.aliyun.com/areas_v2/bound/100000.json
uni.request({
url: 'https://geo.datav.aliyun.com/areas_v2/bound/100000_full.json',
url: ' https://geo.datav.aliyun.com/areas/bound/100000_full.json',
data: {},
success: function(res) {
// console.log(res);
console.log(res);
let data = res.data.features;
data.forEach(function(value, index, array) {
value.color = "#CBE2E6";
if (value.properties.name == "新疆维吾尔自治区") {
value.properties.name = "新疆"
... ... @@ -88,12 +93,16 @@
value.properties.name = "澳门"
} else if (value.properties.name == '宁夏回族自治区') {
value.properties.name = '宁夏'
} else {
}else if (value.properties.name == '重庆市') {
value.properties.name = '重庆'
}else {
let name = value.properties.name.split('省');
console.log('3277344',name)
value.properties.name = name[0];
}
console.log(value.properties.name,9999)
})
uni.hideLoading()
let cMap = {
... ... @@ -120,6 +129,7 @@
},
});
},
showMap(canvasId, chartData) {
canvaMap = new uCharts({
$this: _self,
... ... @@ -166,10 +176,12 @@
app.post(url, params).then((res) => {
console.log(res)
that.cityname = res.data.data;
console.log(that.cityname)
this.getServerData();
}).catch((err) => {
console.log(err,999888)
})
},
... ...
... ... @@ -6,27 +6,44 @@
</view>
</view>
<view class="miaoshatime flexthree" v-if="timestatus==1">
<view class="miaoshatime flexthree" v-if="timestatus==2">
<view class='miaoname'>距离开始</view>
<!-- days:'',
hours:'',
minutes:'',
seconds:'', -->
<view class='miaotime miaohour boxsizing'>{{days}}</view>
<view class="miaoname">天</view>
<view class="miaofen flexone miaohour">
<view class='miaotime miaok'>{{hours}}</view>
<!-- <view class='miaotime'>3</view> -->
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>{{minutes}}</view>
<!-- <view class='miaotime boxsizing'>5</view> -->
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>{{seconds}}</view>
<!-- <view class='miaotime boxsizing'>2</view> -->
</view>
</view>
<view class="miaoshatime flexthree" v-if="timestatus==1">
<view class='miaoname'>距离结束</view>
<view class='miaotime miaohour boxsizing'>{{days}}</view>
<view class="miaoname">天</view>
<view class="miaofen flexone miaohour">
<view class='miaotime miaok'>{{hours}}</view>
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>{{minutes}}</view>
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>{{seconds}}</view>
</view>
</view>
<!-- 搜索商品 -->
... ... @@ -55,63 +72,7 @@
</view>
</view>
</view>
<!-- <view class="searchgooditem flexone boxsizing">
<view class="gooditemleft">
<image src="../../static/goopic.png" mode=""></image>
</view>
<view class="gooditemright ">
<view class="goodsouname morehidden">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>
<view class="miaogood flextwo">
<view class="miaogoodleft">
<view class="saleprice">¥288</view>
<view class="yuansaleprice">¥340</view>
</view>
<view class="buynow">立即抢购</view>
</view>
<view class="miaojindu flextwo">
<view class="miaojinduleft">
<view class="miaojinnei"></view>
</view>
<view class="miaojinduright">已抢60%</view>
</view>
</view>
</view>
<view class="searchgooditem flexone boxsizing">
<view class="gooditemleft">
<image src="../../static/goopic.png" mode=""></image>
</view>
<view class="gooditemright ">
<view class="goodsouname morehidden">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>
<view class="miaogood flextwo">
<view class="miaogoodleft">
<view class="saleprice">¥288</view>
<view class="yuansaleprice">¥340</view>
</view>
<view class="buynow">立即抢购</view>
</view>
<view class="miaojindu flextwo">
<view class="miaojinduleft">
<view class="miaojinnei"></view>
</view>
<view class="miaojinduright">已抢60%</view>
</view>
</view>
</view>
-->
</view>
... ... @@ -145,7 +106,6 @@
var url = 'flour_goods/seckill_setting';
var params = {
}
console.log(params)
app.post(url,params, "post").then((res) => {
... ... @@ -154,12 +114,12 @@
let now_time = parseInt(new Date().getTime())
now_time=parseInt(now_time/1000);
let remaintime=res.data.data.endtime-now_time
let number = remaintime;
let number = res.data.data.time;
// 时间戳处理
var totalSecond = number;
console.log(totalSecond);
var interval = setInterval(function () {
// 秒数
// 秒数
var second = totalSecond;
// 天数位
... ... @@ -183,7 +143,6 @@
that.hours=hrStr;
that.minutes=minStr;
that.seconds=secStr;
totalSecond--;
if (totalSecond <= 0) {
... ... @@ -206,7 +165,6 @@
},
getmiaosha() {
let that = this;
var url = 'flour_goods/get_flour_goods';
... ... @@ -220,7 +178,7 @@
app.post(url, params, "post").then((res) => {
console.log(res);
that.orderlist=that.orderlist.concat(res.data.data)
// that.goodinfo=res.data.data;
}).catch((err) => {})
... ... @@ -246,7 +204,6 @@
}
</script>
<style>
@import url('../../base/homepage');
</style>
... ...
<template>
<view class="content">
<view class="giftlist">
<!-- v-for="(item,index) in giftarr" :key="index" -->
<view class="giftitem flextwo" v-for="(item,index) in giftarr" :key="index">
<view class="giftitemleft">
<view class="flexone" v-if="item.type==1">
... ... @@ -18,13 +18,7 @@
<view class="itemnamek" v-if="item.is_give==1" @click="givegift(item)">已兑换</view>
</view>
<!-- <view class="giftitem flextwo">
<view class="giftitemleft">
<view class="itemtop">我的奖品</view>
<view class="itemtime">2019-10-13 15:30:30</view>
</view>
<view class="itemnamek">立即兑换</view>
</view> -->
</view>
</view>
</template>
... ... @@ -68,7 +62,7 @@
}
}
that.giftarr =that.giftarr.concat(res.data.data);
// that.goodinfo=res.data.data;
}).catch((err) => {
... ... @@ -96,9 +90,7 @@
setTimeout(function(){
that.getgift()
},1500)
// that.giftarr = res.data.data;
// that.goodinfo=res.data.data;
}).catch((err) => {
console.log(err)
... ... @@ -117,19 +109,7 @@
url:'/pages/homepage/giftorder?gift_log_id='+item.id+'&item='+newitem
})
// var url = 'gift/give';
// console.log('获取的参数', that.seldata)
// var params = {
// gift_log_id: item.id
// }
// console.log(params)
// app.post(url, params, "post").then((res) => {
// console.log(res);
// that.giftarr = res.data.data;
// // that.goodinfo=res.data.data;
// }).catch((err) => {})
}
... ...
... ... @@ -60,7 +60,7 @@
<view class="nodata" v-if="goodlist.length==0">暂无数据</view>
<view v-else>
<view class="searchgooditem flexone boxsizing" v-for="(item,index) in goodlist" :key="index" @click="goodtail" :data-id="item.id">
<view class="searchgooditem flexone boxsizing" v-for="(item,index) in goodlist" :key="index" @click="goodtail" :data-id="item.id" :data-item="item">
<view class="gooditemleft">
<image :src="item.image" mode=""></image>
</view>
... ... @@ -358,14 +358,25 @@
// 进入商品详情页
goodtail(e) {
let id = e.currentTarget.dataset.id;
let obj=e.currentTarget.dataset.item;
obj=JSON.stringify(obj)
// type 1 面访商品 2积分商城商品
uni.navigateTo({
url: '/pages/nearshop/goodtail?id=' + id + '&type=' + 3
url: '/pages/nearshop/goodtail?id=' + id + '&type=' + 3+'&obj='+obj
})
},
// 搜索
search(e) {
this.keyword = e.detail.value;
console.log(e)
this.history = false;
this.shopshow = true;
this.searchgood = false;
this.searchgoodk = false;
this.pages=1;
this.goodlist=[]
this.serarchgoodlist()
// this.keyword = e.detail.value;
},
}
... ... @@ -374,17 +385,6 @@
<style>
@import url('../../base/homepage');
/* .status_bar {
height: var(--status-bar-height);
width: 100%;
background: #fff;
position: fixed;
top: 0;
left: 0;
z-index: 3;
} */
.searchbigbox {
margin-top: 150rpx !important;
}
... ...
<template>
<view class="content">
<view class="logo">
<image src="../../static/logok.png" mode=""></image>
<image src="../../static/kogok.jpg" mode=""></image>
</view>
<view class="loginbox">
<view class="loginboxitem flex">
<view class="boxitemleft">
<image src="../../static/phone.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="number" value="" placeholder="请输入手机号" placeholder-class="enter" @input="enterphone" />
</view>
<view class="logoname">中国面条</view>
<view class="loginone">
<image src="../../static/loginone.jpg" mode=""></image>
<view class="denglubtn flextwo">
<view class='dengluleft'>登录</view>
<view class='dengluleft' @click="register">注册</view>
</view>
<view class="loginboxitem flextwo">
<view class="flextwo">
<view class="inputk flexone">
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
<view class="loginbox loginboxbox">
<view class="loginboxitem flex">
<view class="boxitemleft">
<image src="../../static/phone.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="number" value="" placeholder="请输入手机号" placeholder-class="enter" @input="enterphone" />
</view>
</view>
<view class="loginboxitem flextwo">
<view class="flextwo">
<view class="inputk flexone">
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="password" value="" placeholder="请输入密码" placeholder-class="enter" @input="entercode" v-if="passtrue" />
<input type="text" value="" placeholder="请输入密码" placeholder-class="enter" @input="entercode" v-else />
</view>
</view>
<view class="boxitemright">
<input type="password" value="" placeholder="请输入密码" placeholder-class="enter" @input="entercode" v-if="passtrue" />
<input type="text" value="" placeholder="请输入密码" placeholder-class="enter" @input="entercode" v-else />
<view class="eye" @click="chosepassword">
<image src="../../static/closeeye.png" mode="" v-if="passtrue"></image>
<image src="../../static/openeye.png" mode="" v-else></image>
</view>
</view>
<view class="eye" @click="chosepassword">
<image src="../../static/closeeye.png" mode="" v-if="passtrue"></image>
<image src="../../static/openeye.png" mode="" v-else></image>
<!-- <view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view> -->
<!-- <view class="cardyan" @click="getcode">{{time}}</view> -->
</view>
<view class="password flextwo">
<view class="passwordleft" @click="forgetmima">忘记密码?</view>
<!-- <view class="shuxian">|</view> -->
<view class="passwordleft zhucename" @click="register">立即注册</view>
</view>
<button class="loginbtnbtn" @click="login" v-if="showlogin">登录</button>
<button class="loginbtnbtn" v-else>登录</button>
<view class="loginword">
<div class="flexone">
<image src="../../static/nosel.png" mode="" class="nosel" v-if="agreeno" @click="noselagree"></image>
<image src="../../static/selactive.png" mode="" class="sel" v-else @click="selagree"></image>
登录即表示同意 <text class="xieyi" @click="xieyi">用户协议</text>和<text class="xieyi" @click="xieyi">隐私协议</text>
</div>
<view class="phonecode" @click="loginindex">短信验证码登录</view>
<view v-if="openclose==1">
<view class="title">快捷登录</view>
<view class="flexthree lgoinboxkk">
<image src="../../static/icon_wechat.png" mode="" class="loginimg" @click="wxlogin"></image>
<!-- <image src="../../static/qqlogin.jpg" mode="" class="loginimg"></image>
<image src="../../static/xinlang.jpg" mode="" class="loginimg"></image> -->
</view>
</view>
</view>
<!-- <view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view> -->
<!-- <view class="cardyan" @click="getcode">{{time}}</view> -->
</view>
<button class="loginbtn" @click="login">登录</button>
<view class="loginword">
登录即表示同意 <text class="xieyi" @click="xieyi" :data-type="1">用户协议</text>和<text class="xieyi" @click="xieyi" :data-type="2">隐私协议</text>
<view class="phonecode" @click="loginindex">短信验证码登录</view>
<view class="title">快捷登录</view>
<view class='btnbottom' @click="wxlogin">
<view class="btnimgwei">
<image src="../../static/weixin.png" mode=""></image>
</view>
<!-- 服务协议和隐私政策 -->
<view class="register" v-if="xieyishow">
<view class='yinsiwrap'>
<view class='yinsitop'>服务协议和隐私政策</view>
<view class='xiepage'>
<view class="xiyibox">
请你务必谨慎阅读充分理解"服务协议"和"隐私政策"各条款,包括但不限于:为了向你提供及时通讯,内容分享等服务,我们需要收集你的设备信息、操作日志等惹人信息,你可以在"设置"中查看、
变更、删除个人信息并管理你的权限
</view>
微信登录
</view>
<!-- <view class='btnbottom'>
<view class="btnimgwei">
<image src="../../static/zhifubao.png" mode=""></image>
<view class="xiyibox">
你可阅读<text class="lianxie" @click="goxieyi" :data-type="1">《用户协议》</text>和<text class="lianxie" @click="goxieyi"
:data-type="2">《隐私协议》</text>
了解详细信息。如你同意,请点击"同意"开始接受我们的服务
</view>
支付宝登录
</view> -->
</view>
<view class="password flexthree">
<view class="passwordleft" @click="forgetmima">忘记密码?</view>
<view class="shuxian">|</view>
<view class="passwordleft" @click="register">立即注册</view>
</view>
<view class="xiebot flexone">
<view class="xiebotleft" @click="nouse">暂不使用</view>
<view class="xiebotright" @click="agree">同意</view>
</view>
</view>
</view>
<view class="register" v-if="tipsone">
<view class="loginwrap">
<view class="tip">温馨提示</view>
... ... @@ -96,10 +145,68 @@
code: '',
type: '',
chosetype: 'Password',
passtrue: true
passtrue: true,
openclose: '',
xieyishow: false,
xieyitype: '',
agreeno: true,
showlogin: true
}
},
methods: {
// 没有选中
noselagree() {
this.agreeno = false
},
// 选中
selagree() {
this.agreeno = true
},
// 协议
xieyi(e) {
let type = e.currentTarget.dataset.type;
this.xieyishow = true;
},
goxieyi(e) {
let type = e.currentTarget.dataset.type;
if (this.type == 1) {
uni.navigateTo({
url: '/pages/login/xieyi?type=' + type
})
} else {
uni.navigateTo({
url: '/pages/login/xieyi?type=' + type
})
}
},
nouse() {
this.xieyishow = false
this.agreeno = true
},
agree() {
this.xieyishow = false
this.agreeno = false
},
// 获取开关
getkaiguan() {
let that = this;
var url = 'page/get_switch';
var params = {
}
app.post(url, params).then((res) => {
console.log(res.data.data.switch);
that.openclose = res.data.data.switch;
console.log('43783488949348', that.openclose)
}).catch((err) => {
})
},
// 密码
chosepassword() {
this.passtrue = !this.passtrue;
... ... @@ -117,11 +224,13 @@
// 登录
login() {
let that = this;
that.showlogin = false
if (that.phone == '') {
uni.showToast({
title: "请输入手机号",
icon: 'none'
})
that.showlogin = true
return false
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
... ... @@ -129,6 +238,7 @@
title: '请输入正确手机号',
icon: 'none'
})
that.showlogin = true
return false;
}
... ... @@ -137,6 +247,15 @@
title: "请输入密码",
icon: 'none'
})
that.showlogin = true
return false
}
if (that.agreeno == true) {
uni.showToast({
title: "请选择用户协议和隐私协议",
icon: 'none'
})
that.showlogin = true
return false
}
var url = 'user/login1';
... ... @@ -158,9 +277,10 @@
url: '/pages/homepage/homepage'
})
}, 1500);
}).catch((err) => {
console.log(err)
that.showlogin = true
console.log(err.data)
uni.showToast({
title: err.msg,
... ... @@ -240,24 +360,8 @@
})
},
sure() {
// this.tipstwo = false
},
xieyi(e) {
console.log(e)
let type = e.currentTarget.dataset.type;
if (type == 1) {
uni.navigateTo({
url: '/pages/login/xieyi?type=' + type
})
} else {
uni.navigateTo({
url: '/pages/login/xieyi?type=' + type
})
}
},
forgetmima() {
uni.navigateTo({
url: '/pages/login/forgetmima'
... ... @@ -270,7 +374,7 @@
console.log('App Launch,app启动')
},
onShow: function() {
this.getkaiguan()
},
onHide: function() {
console.log('App Hide,app不再展现在前台')
... ... @@ -293,7 +397,76 @@
/* overflow-y: hidden; */
}
.nosel,
.sel {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx
}
.loginbtn {
margin-top: 62rpx;
}
.yinsiwrap {
width: 600rpx;
height: 660rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 10rpx;
padding: 40rpx 32rpx 32rpx;
box-sizing: border-box;
}
.yinsitop {
color: #333;
font-size: 36rpx;
text-align: center;
margin-bottom: 20rpx
}
.xiepage {
margin-top: 20rpx
}
.xiyibox {
color: #333;
font-size: 30rpx;
}
.lianxie {
color: #FF9417;
font-size: 30rpx;
}
.xiebot {
width: 600rpx;
height: 100rpx;
position: absolute;
bottom: 0;
left: 0;
border-top: 1rpx solid #f5f5f5
}
.xiebotleft {
width: 300rpx;
height: 100rpx;
text-align: center;
border-right: 1rpx solid #f5f5f5;
color: #3333;
font-size: 32rpx;
line-height: 100rpx;
}
.xiebotright {
width: 300rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #FF9417;
font-size: 32rpx;
}
</style>
... ...
... ... @@ -31,18 +31,10 @@
</view>
</view>
<!-- 邀请码 -->
<!-- <view class="setpassword flextwo">
<view class="flexone inputk">
<view class="setpasswordleft">邀请码</view>
<view class="setpasswordright">
<input placeholder="请输入邀请码" @input="enteryaoqing" type="text">
</view>
</view>
</view> -->
</view>
<view class="loginbtn finish" @click="finish">确认注册</view>
... ... @@ -60,12 +52,12 @@
passtrue: true,
passtruek: true,
yaoqingcode: '',
}
},
onLoad(options) {
this.phone = options.phone;
this.yaoqingcode=options.share_number
this.yaoqingcode = options.share_number
},
methods: {
// 输入邀请码
... ... @@ -87,6 +79,23 @@
entersecond(e) {
this.secondcode = e.detail.value
},
// 新人获取优惠券
newpeoplecoupon() {
let that = this;
var url = 'user_ticket/user_new';
var params = {
}
console.log('48488', params)
app.post(url, params).then((res) => {
console.log(res,'新人获取优惠券8888888');
}).catch((err) => {
console.log('888', err)
})
},
// 完成注册
finish() {
let that = this;
... ... @@ -129,6 +138,8 @@
icon: 'none'
})
uni.setStorageSync("token", r.data.data.token)
that.newpeoplecoupon()
// uni.setStorageSync('user',1)
setTimeout(function() {
uni.switchTab({
... ... @@ -148,6 +159,8 @@
})
}
}
}
... ...
... ... @@ -15,14 +15,14 @@
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="text" :value="code" placeholder="请输入验证码" placeholder-class="enter" @input="entercode" />
<input type="text" placeholder="请输入验证码" placeholder-class="enter" @input="entercode" />
</view>
</view>
<view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view>
<!-- <picyan @picname="getpic"></picyan> -->
<!-- <view class="shortyanzheng" @click="changenum">{{rangenum}}</view> -->
</view>
<view class="loginbtn rightbtn" @click="setmima">下一步</view>
</view>
... ...
<template>
<view class="content">
<view class="logo">
<image src="../../static/logok.png" mode=""></image>
<image src="../../static/kogok.jpg" mode=""></image>
</view>
<view class="loginbox">
<view class="loginboxitem flex">
<view class="boxitemleft">
<image src="../../static/phone.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="number" value="" placeholder="请输入手机号" placeholder-class="enter" @input="enterphone" />
</view>
<view class="logoname">中国面条</view>
<view class="loginone">
<image src="../../static/loginone.jpg" mode=""></image>
<view class="denglubtn flextwo">
<view class='dengluleft'>登录</view>
<view class='dengluleft' @click="register">注册</view>
</view>
<view class="loginboxitem flextwo">
<view class="flex">
<view class="loginbox loginboxbox">
<view class="loginboxitem flex">
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
<image src="../../static/phone.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="text" :value="code" placeholder="请输入短信验证码" placeholder-class="enter" @input="entercode" />
<input type="number" value="" placeholder="请输入手机号" placeholder-class="enter" @input="enterphone" />
</view>
</view>
<view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view>
<!-- <view class="cardyan" @click="getcode">{{time}}</view> -->
</view>
<button class="loginbtn" @click="login">登录</button>
<view class="loginword">
登录即表示同意 <text class="xieyi" @click="xieyi" :data-type="1">用户协议</text>和<text class="xieyi" @click="xieyi" :data-type="2">隐私协议</text>
<view class="phonecode" @click="phonenumber">手机号密码登录</view>
<view class="title">快捷登录</view>
<view class='btnbottom' @click="wxlogin">
<view class="btnimgwei">
<image src="../../static/weixin.png" mode=""></image>
<view class="loginboxitem flextwo">
<view class="flex">
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="text" placeholder="请输入短信验证码" placeholder-class="enter" @input="entercode" maxlength="4" />
</view>
</view>
微信登录
<view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view>
</view>
<!-- <view class='btnbottom'>
<view class="btnimgwei">
<image src="../../static/zhifubao.png" mode=""></image>
<view class="password flextwo">
<view class="passwordleft" @click="forgetmima">忘记密码?</view>
<view class="passwordleft zhucename" @click="register">立即注册</view>
</view>
<button class="loginbtnbtn" @click="login" v-if="showlogin">登录</button>
<button class="loginbtnbtn" v-else>登录</button>
<view class="loginword">
<div class="flexone">
<image src="../../static/nosel.png" mode="" class="nosel" v-if="agreeno" @click="noselagree"></image>
<image src="../../static/selactive.png" mode="" class="sel" v-else @click="selagree"></image>
登录即表示同意 <text class="xieyi" @click="xieyi">用户协议</text>和<text class="xieyi" @click="xieyi">隐私协议</text>
</div>
<view class="phonecode" @click="phonenumber">手机号密码登录</view>
<!-- v-if="openclose==1"v-if="openclose==1" -->
<view v-if="openclose==1">
<view class="title">快捷登录</view>
<view class="flexthree lgoinboxkk">
<image src="../../static/icon_wechat.png" mode="" class="loginimg" @click="wxlogin"></image>
<!-- <image src="../../static/qqlogin.jpg" mode="" class="loginimg" @click="qqlogin"></image> -->
<!-- <image src="../../static/xinlang.jpg" mode="" class="loginimg"></image> -->
</view>
</view>
支付宝登录
</view> -->
</view>
<view class="password flexthree">
<view class="passwordleft" @click="forgetmima">忘记密码?</view>
<view class="shuxian">|</view>
<view class="passwordleft" @click="register">立即注册</view>
</view>
</view>
</view>
<view class="register" v-if="tipsone">
... ... @@ -71,7 +78,36 @@
</view>
</view>
</view>
<!-- 服务协议和隐私政策 -->
<view class="register" v-if="xieyishow">
<view class='yinsiwrap'>
<view class='yinsitop'>服务协议和隐私政策</view>
<view class='xiepage'>
<view class="xiyibox">
请你务必谨慎阅读充分理解"服务协议"和"隐私政策"各条款,包括但不限于:为了向你提供及时通讯,内容分享等服务,我们需要收集你的设备信息、操作日志等惹人信息,你可以在"设置"中查看、
变更、删除个人信息并管理你的权限
</view>
<view class="xiyibox">
你可阅读<text class="lianxie" @click="goxieyi" :data-type="1">《用户协议》</text>和<text class="lianxie" @click="goxieyi"
:data-type="2">《隐私协议》</text>
了解详细信息。如你同意,请点击"同意"开始接受我们的服务
</view>
</view>
<view class="xiebot flexone">
<view class="xiebotleft" @click="nouse">暂不使用</view>
<view class="xiebotright" @click="agree">同意</view>
</view>
</view>
</view>
</view>
</template>
<script>
... ... @@ -81,7 +117,8 @@
data() {
return {
width:120,height:45,
width: 120,
height: 45,
tipstwo: false,
tipsone: false,
currentTime: 60,
... ... @@ -91,17 +128,51 @@
code: '',
setcode: '',
type: '',
openclose: '',
xieyishow: false,
xieyitype: '',
agreeno: true,
showlogin: true
}
},
methods: {
// 获取开关
getkaiguan() {
let that = this;
var url = 'page/get_switch';
var params = {
}
app.post(url, params).then((res) => {
console.log(res.data.data.switch);
that.openclose = res.data.data.switch;
console.log('43783488949348', that.openclose)
}).catch((err) => {
})
},
// 没有选中
noselagree() {
this.agreeno = false
},
// 选中
selagree() {
this.agreeno = true
},
// 输入手机号
enterphone(e) {
this.phone = e.detail.value
},
// 输入验证码
entercode(e) {
this.code = e.detail.value;
... ... @@ -134,6 +205,7 @@
let url = "user/get_code";
let param = {
mobile: that.phone,
is_register: 0
};
console.log('8888', param)
app.post(url, param, 'get').then(r => {
... ... @@ -155,6 +227,10 @@
}).catch(err => {
console.log(err);
uni.showToast({
title: err.msg,
icon: 'none'
})
})
},
... ... @@ -162,11 +238,13 @@
// 登录
login() {
let that = this;
that.showlogin = false
if (that.phone == '') {
uni.showToast({
title: "请输入手机号",
icon: 'none'
})
that.showlogin = true
return false
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
... ... @@ -174,6 +252,7 @@
title: '请输入正确手机号',
icon: 'none'
})
that.showlogin = true
return false;
}
... ... @@ -182,15 +261,17 @@
title: "请输入验证码",
icon: 'none'
})
that.showlogin = true
return false
}
if (that.code != '') {
// that.istestcode()
// uni.showToast({
// title: '请输入正确的验证码',
// icon: 'none'
// })
// return false
if (that.agreeno == true) {
uni.showToast({
title: "请选择用户协议和隐私协议",
icon: 'none'
})
that.showlogin = true
return false
}
console.log('38983948934894389', uni.getStorageSync("third_id"))
var url = 'user/login2';
... ... @@ -199,7 +280,7 @@
code: that.code,
third_id: uni.getStorageSync("third_id") == undefined ? '' : uni.getStorageSync("third_id")
}
console.log('347834734793493498',params)
console.log('347834734793493498', params)
app.post(url, params, "post").then((res) => {
console.log(res, '37443');
uni.showToast({
... ... @@ -214,16 +295,7 @@
uni.switchTab({
url: '/pages/homepage/homepage'
})
// if(that.type==1){
// let url=uni.getStorageSync("url");
// console.log('我是url',url)
// uni.navigateTo({
// url:url
// })
// }else{
// }
}, 1500);
}).catch((err) => {
... ... @@ -232,32 +304,32 @@
title: err.msg,
icon: 'none'
})
that.showlogin = true
clearInterval(interval);
that.time = '发送验证码';
that.currentTime = 61;
that.disable = false;
})
},
istestcode(){
let that = this;
var url = 'user/register1';
var params = {
mobile:that.phone,
code:that.code,
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
console.log('888',err)
uni.showToast({
title:"验证码错误"
})
istestcode() {
let that = this;
var url = 'user/register1';
var params = {
mobile: that.phone,
code: that.code,
})
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
console.log('888', err)
uni.showToast({
title: "验证码错误"
})
})
},
// 注册
register() {
... ... @@ -271,13 +343,17 @@
})
},
sure() {
// this.tipstwo = false
},
xieyi(e) {
let type = e.currentTarget.dataset.type;
if (type == 1) {
this.xieyishow = true;
},
goxieyi(e) {
let type = e.currentTarget.dataset.type;
if (this.type == 1) {
uni.navigateTo({
url: '/pages/login/xieyi?type=' + type
})
... ... @@ -287,6 +363,15 @@
})
}
},
nouse() {
this.xieyishow = false
this.agreeno = true
},
agree() {
this.xieyishow = false
this.agreeno = false
},
forgetmima() {
uni.navigateTo({
url: '/pages/login/forgetmima'
... ... @@ -298,12 +383,13 @@
uni.login({
provider: 'weixin',
success: function(loginRes) {
console.log(1234567890)
console.log(loginRes.authResult);
// 获取用户信息
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
console.log(infoRes)
console.log(infoRes, 6666666)
console.log('用户昵称为:' + infoRes.userInfo.nickName);
var url = 'user/wechat_login';
var params = {
... ... @@ -314,7 +400,9 @@
city: infoRes.userInfo.city,
province: infoRes.userInfo.province,
country: infoRes.userInfo.country,
more: JSON.stringify(infoRes.userInfo)
more: JSON.stringify(infoRes.userInfo),
unionid:infoRes.userInfo.unionId
}
console.log('参数', params)
... ... @@ -325,16 +413,16 @@
uni.navigateTo({
url: '/pages/login/registercode'
})
} else {
uni.showToast({
title: '登录成功',
icon: 'none'
})
uni.setStorageSync("token", res.data.data.token)
let token=uni.getStorageSync("token");
console.log('我是toknewowjejw',token)
let token = uni.getStorageSync("token");
console.log('我是toknewowjejw', token)
setTimeout(function() {
uni.switchTab({
... ... @@ -343,7 +431,6 @@
}, 1500)
}
}).catch((err) => {
console.log(err)
... ... @@ -351,6 +438,9 @@
}
});
},
fail: function(res) {
console.log(res, 888999777)
}
});
}
... ... @@ -360,8 +450,9 @@
console.log('App Launch,app启动')
},
onShow: function() {
this.getkaiguan()
console.log(uni.getSystemInfoSync().platform)
},
onHide: function() {
console.log('App Hide,app不再展现在前台')
... ... @@ -383,9 +474,83 @@
/* page {
overflow-y: hidden;
} */
.nosel,
.sel {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx
}
/* .loginword{
display:flex;
align-items: center;
} */
.loginbtn {
margin-top: 62rpx;
}
.yinsiwrap {
width: 600rpx;
height: 660rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 10rpx;
padding: 40rpx 32rpx 32rpx;
box-sizing: border-box;
}
.yinsitop {
color: #333;
font-size: 36rpx;
text-align: center;
margin-bottom: 20rpx
}
.xiepage {
margin-top: 20rpx
}
.xiyibox {
color: #333;
font-size: 30rpx;
}
.lianxie {
color: #FF9417;
font-size: 30rpx;
}
.xiebot {
width: 600rpx;
height: 100rpx;
position: absolute;
bottom: 0;
left: 0;
border-top: 1rpx solid #f5f5f5
}
.xiebotleft {
width: 300rpx;
height: 100rpx;
text-align: center;
border-right: 1rpx solid #f5f5f5;
color: #3333;
font-size: 32rpx;
line-height: 100rpx;
}
.xiebotright {
width: 300rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #FF9417;
font-size: 32rpx;
}
</style>
... ...
... ... @@ -20,7 +20,7 @@
</view>
</view>
<picyan @picname="getpic"></picyan>
<!-- <view class="shortyanzheng" @click="changenum">{{rangenum}}</view> -->
</view>
<view class="registerbot">
... ...
<template>
<view clas="content">
<view class="loginbox loginboxmima">
<view class="yanzheng">请输入手机号验证码完成注册</view>
<view class="entercode">
<input type="number" placeholder="请输入邀请码" placeholder-class="entercode" value="" @input="entershare"/>
</view>
<view class="entercode">
<input type="number" placeholder="请输入手机号" placeholder-class="entercode" value="" @input="enterphone"/>
<view class="logo">
<image src="../../static/kogok.jpg" mode=""></image>
</view>
<view class="logoname">中国面条</view>
<view class="loginone">
<image src="../../static/logintwo.jpg" mode=""></image>
<view class="denglubtn flextwo">
<view class='dengluleft' @click="loginlogin">登录</view>
<view class='dengluleft'>注册</view>
</view>
<!-- <view class="yanzheng yanzhengphone">{{phone}}</view> -->
<view class="entercode">
<input type="text" placeholder="请输入验证码" placeholder-class="entercode" :value="codenum" @input="entercode"/>
<view class="loginbox loginboxbox">
<view class="loginboxitem flex">
<view class="boxitemleft">
<image src="../../static/phone.png" mode=""></image>
</view>
<view class="boxitemright">
<input type="number" value="" placeholder="请输入手机号" placeholder-class="entercode" value="" @input="enterphone" />
</view>
</view>
<view class="loginboxitem flextwo">
<view class="flex">
<view class="boxitemleft">
<image src="../../static/card.png" mode=""></image>
</view>
<view class="boxitemright">
<!-- @input="entercode" -->
<input type="text" placeholder="请输入验证码" placeholder-class="entercode" @blur="yanzhengcode" @input="entercode" />
</view>
</view>
<view class="cardyan" @click="disable==false?getcode():''">{{time}}</view>
<!-- <view class="cardyan" v-else>{{time}}</view> -->
<!-- <view class="cardyan" @click="getcode">{{time}}</view> -->
</view>
<view class="loginboxitem flex">
<view class="setpasswordleft">密码</view>
<view class="setpasswordright">
<input placeholder="6-16个字符以内,区分大小写" @input="enterfirst" type="password" v-if="passtrue">
<input placeholder="6-16个字符以内,区分大小写" @input="enterfirst" type="text" v-else>
</view>
<view class="eye" @click="chosepassword">
<image src="../../static/closeeye.png" mode="" v-if="passtrue"></image>
<image src="../../static/openeye.png" mode="" v-else></image>
</view>
</view>
<view class="loginboxitem flex">
<view class="setpasswordleft">确认密码</view>
<view class="setpasswordright">
<input placeholder="请再次输入" @input="entersecond" type="password" v-if="passtruek">
<input placeholder="请再次输入" @input="entersecond" type="text" v-else>
</view>
<view class="eye" @click="chosepasswordk">
<image src="../../static/closeeye.png" mode="" v-if="passtruek"></image>
<image src="../../static/openeye.png" mode="" v-else></image>
</view>
</view>
<view class="loginboxitem flex">
<view class="setpasswordleft">邀请码</view>
<view class="setpasswordright">
<input type="number" placeholder="请输入邀请码(选填)" placeholder-class="entercode" value="" @input="entershare">
</view>
</view>
<button class="loginbtnbtn" @click="finish" v-if="showlogin">注册</button>
<button class="loginbtnbtn" v-else>注册</button>
</view>
<view class="reenter" @click="disable==false?getcode():''">{{time}}</view>
<view class="reenter" @click="gologin">已有账号,去登录</view>
</view>
<view class="loginbtn finish" @click="finishcode">下一步</view>
</view>
</template>
<script>
import app from "../../App.vue";
var interval=''
export default {
data() {
return {
showbanben: false,
phone:'',
time: '获取验证码',
disable: false,
code: '',
currentTime:60,
codenum:'',
setcode:'',
share_number:''
}
},
onLoad(options) {
// this.phone='15822184121'
},
methods: {
// 输入邀请码
entershare(e){
this.share_number=e.detail.value
},
// 已有账号去登录
gologin(){
uni.reLaunch({
url:'/pages/login/loginindex'
})
},
//输入手机号
enterphone(e){
this.phone=e.detail.value
},
// 输入验证码
entercode(e){
this.codenum=e.detail.value
},
// 获取验证码
getcode() {
console.log(9999)
let that = this;
that.disable = true;
if(this.phone==''){
var interval = ''
export default {
data() {
return {
showbanben: false,
phone: '',
time: '获取验证码',
disable: false,
code: '',
currentTime: 60,
codenum: '',
setcode: '',
share_number: '',
// 输入密码
firscode: '',
secondcode: '',
// phone: '',
passtrue: true,
passtruek: true,
yaoqingcode: '',
showlogin:true
}
},
onLoad(options) {
},
methods: {
// 去登录页面
loginlogin(){
uni.navigateTo({
url:'/pages/login/loginindex'
})
},
// 输入邀请码
entershare(e) {
this.share_number = e.detail.value
},
// 已有账号去登录
gologin() {
uni.reLaunch({
url: '/pages/login/loginindex'
})
},
//输入手机号
enterphone(e) {
this.phone = e.detail.value
},
// 输入验证码
entercode(e) {
this.codenum = e.detail.value
},
// 获取验证码
getcode() {
console.log(9999)
let that = this;
that.disable = true;
if (this.phone == '') {
uni.showToast({
title:"请输入手机号",
icon:'none'
title: "请输入手机号",
icon: 'none'
})
this.disable=false;
this.disable = false;
return false
}
if(this.phone!=''){
if (this.phone != '') {
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
this.disable=false;
this.disable = false;
return false
}
}
let currentTime = that.currentTime;
let url = "user/get_code";
let param = {
mobile: that.phone,
};
console.log('8888', param)
app.post(url, param, 'post').then(r => {
console.log('999',r)
this.setcode=r.data.data.code;
this.codenum=r.data.data.code;
let currentTime = that.currentTime;
let url = "user/get_code";
let param = {
mobile: that.phone,
is_register: 1
};
console.log('8888', param)
app.post(url, param, 'post').then(r => {
console.log('999', r)
this.setcode = r.data.data.code;
this.codenum = r.data.data.code;
interval = setInterval(function() {
currentTime--;
that.time = currentTime + '秒'
if (currentTime <= 0) {
clearInterval(interval)
that.time = '重新发送';
that.currentTime = 61;
that.disable = false;
}
}, 1000)
}).catch(err => {
console.log(err)
uni.showToast({
title: err.msg,
icon: "none"
})
})
},
istestcode() {
let that = this;
var url = 'user/register1';
var params = {
mobile: that.phone,
code: that.setcode,
share_number: that.share_number
}
console.log('48488', params)
app.post(url, params).then((res) => {
console.log(res);
interval = setInterval(function() {
currentTime--;
that.time = currentTime + '秒'
if (currentTime <= 0) {
clearInterval(interval)
that.time = '重新发送';
that.currentTime = 61;
that.disable = false;
}
}, 1000)
}).catch(err => {
console.log(err)
})
},
istestcode(){
let that = this;
var url = 'user/register1';
var params = {
mobile:that.phone,
code:that.setcode,
share_number:that.share_number
}
console.log('48488',params)
app.post(url, params).then((res) => {
console.log(res);
uni.navigateTo({
url:"/pages/login/finishregister?phone="+this.phone+'&share_number='+this.share_number
})
}).catch((err) => {
console.log('888',err)
uni.showToast({
title:err.msg,
icon:"none"
})
})
},
// 下一步
finishcode(){
if(this.phone==''){
uni.showToast({
title:'请输入手机号',
icon:'none'
})
return false
}
if(this.phone!=''){
if (!(/^1[3456789]\d{9}$/.test(this.phone))) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
}).catch((err) => {
console.log('888', err)
uni.showToast({
title: err.msg,
icon: "none"
})
})
},
// 验证验证码
yanzhengcode(){
this.istestcode()
},
// 新人获取优惠券
newpeoplecoupon() {
let that = this;
var url = 'user_ticket/user_new';
var params = {
}
console.log('48488', params)
app.post(url, params).then((res) => {
console.log(res, '新人获取优惠券8888888');
}).catch((err) => {
console.log('888', err)
})
},
// 完成注册
finish() {
let that = this;
if (this.phone == '') {
uni.showToast({
title: '请输入手机号',
icon: 'none'
})
return false
}
if (this.phone != '') {
if (!(/^1[3456789]\d{9}$/.test(this.phone))) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return false
}
}
if (this.codenum == '') {
uni.showToast({
title: '请输入验证码',
icon: 'none'
})
return false
}
if (that.firscode == '') {
uni.showToast({
title: '请输入密码',
icon: "none"
})
return false
}
if (that.secondcode == '') {
uni.showToast({
title: "请输入确认密码",
icon: "none"
})
return false
}
if (that.firscode != that.secondcode) {
uni.showToast({
title: '两次输入密码不一致',
icon: "none"
})
return false
}
let url = "user/register2";
let param = {
mobile: that.phone,
password: that.firscode,
affirm_password: that.secondcode,
third_id: uni.getStorageSync("third_id") == undefined ? '' : uni.getStorageSync("third_id"),
share_number: that.yaoqingcode
};
console.log('8888', param)
app.post(url, param, 'get').then(r => {
console.log(r)
uni.showToast({
title: '注册成功',
icon: 'none'
})
uni.setStorageSync("token", r.data.data.token)
that.newpeoplecoupon()
// uni.setStorageSync('user',1)
setTimeout(function() {
uni.switchTab({
url: '/pages/homepage/homepage'
})
}, 1500)
}).catch(err => {
console.log(err)
uni.showToast({
title: err.msg,
icon: 'none'
})
})
},
chosepassword() {
this.passtrue = !this.passtrue
},
chosepasswordk() {
this.passtruek = !this.passtruek
},
// 输入密码
enterfirst(e) {
this.firscode = e.detail.value
},
//
entersecond(e) {
this.secondcode = e.detail.value
},
// 下一步
finishcode() {
if (this.phone == '') {
uni.showToast({
title: '请输入手机号',
icon: 'none'
})
return false
}
if (this.phone != '') {
if (!(/^1[3456789]\d{9}$/.test(this.phone))) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return false
}
}
if(this.codenum==''){
uni.showToast({
title:'请输入验证码',
icon:'none'
})
return false
}
this.istestcode()
// if(this.codenum!=this.setcode){
// uni.showToast({
// title:"请输入正确的验证码",
// icon:"none"
// })
// return false
// }
console.log(9999)
}
}
}
}
}
if (this.codenum == '') {
uni.showToast({
title: '请输入验证码',
icon: 'none'
})
return false
}
this.istestcode()
console.log(9999)
}
}
}
</script>
<style>
@import url('../../base/login');
page{
page {
overflow-y: hidden;
}
.boxitemleft{
image {
width: 100%;
height: 100%
}
/* .boxitemleft{
width:120rpx;
color:#5A5D62;
font-size: 28rpx;
}
} */
</style>
... ...
<template>
<view class="content">
<view class="xieyitext">
{{contentrule}}
<rich-text :nodes="contentrule"></rich-text>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
... ... @@ -16,6 +16,7 @@
}
},
onLoad(options) {
let that=this;
if(options.type==1){
uni.setNavigationBarTitle({
  title:'用户协议'
... ... @@ -44,11 +45,12 @@
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res)
that.contentrule=res.data.data.content;
// 获取论坛列表
this.getluntanlist()
// this.getluntanlist()
}).catch((err) => {
console.log(err)
... ...
... ... @@ -33,7 +33,7 @@
<input type="text" placeholder="加个标题哦~" placeholder-class="entertitle" @input="entertitle" />
</view>
<view class="contractcontent">
<textarea value="" placeholder="请输入帖子内容" placeholder-class="entertitle" @input="entercontent" />
<textarea value="" placeholder="请输入帖子内容" placeholder-class="entertitle" @input="entercontent" maxlength="-1"/>
</view>
<!-- 上传视频 -->
... ... @@ -65,6 +65,8 @@
</view>
</view>
<view class="buybtn surebtn" @click="issure==false?sure():''">确定</view>
</view>
</template>
... ... @@ -89,6 +91,8 @@
}
},
onLoad(options) {
this.provincename=uni.getStorageSync("provincename")
this.getprovinceid()
this.type=options.type;
if(options.type==2){
let arr=[{
... ... @@ -128,6 +132,24 @@
this.getprovincelist()
},
methods: {
getprovinceid(){
let that = this;
var url = 'question/get_area';
var params = {
province_name: that.provincename
}
console.log('7766554', params)
app.post(url, params).then((res) => {
that.province_id=res.data.data.id;
}).catch((err) => {
console.log(err)
})
},
// 选择招聘求职
bindzhaoChange(e){
this.kindname=this.zhaoarr[e.target.value].name;
... ... @@ -144,6 +166,7 @@
},
// 获取省份列表
getprovincelist() {
let that = this;
var url = 'forum/get_province';
var params = {
... ... @@ -153,8 +176,13 @@
app.post(url, params).then((res) => {
console.log(res);
that.provincelist = res.data.data;
this.provincename=res.data.data[0].name;
that.province_id=res.data.data[0].id;
that.provincelist.forEach(function(value,index,array){
if(value.name==that.provincename){
that.index=index
}
})
// this.provincename=res.data.data[0].name;
// that.province_id=res.data.data[0].id;
// 获取论坛列表
this.getluntanlist()
... ... @@ -199,15 +227,6 @@
deleteimg(index){
this.image.splice(index,1);
// console.log(e)
// var url=e.currentTarget.dataset.url;
// console.log(url)
// for(var i=0;i<this.image.length;i++){
// if(url==this.image[i]){
// }
// }
this.image=this.image;
console.log(this.iamge)
... ... @@ -220,28 +239,12 @@
maxDuration: 60,
camera: 'back',
success(res) {
console.log(res.tempFilePath);
// app.upload('video', res.tempFilePath).then((res) => {
// let videos = that.data.videos;
// videos.push(res.url);
// that.setData({
// videos: videos
// })
// }).catch((err) => {
// console.log(err)
// })
let file = res.tempFilePath
app.upload('image', file, "post").then((res) => {
console.log('上传文件', res);
let url = app.globalData.imgurl+res.url;
that.videoimg=url;
console.log(that.videoimg)
// that.image.push(url)
// console.log(that.image)
}).catch((err) => {
console.log(err)
})
... ... @@ -337,6 +340,7 @@
},1500)
}).catch((err) => {
console.log(err,78767767667)
})
}
... ... @@ -415,17 +419,17 @@
background: #fff;
margin-top:16rpx;
}
.contracttext textarea{
width:100%;
height:220rpx;
color:#BDC4CE;
font-size: 28rpx;
}
.contractcontent{
width:686rpx;
padding: 34rpx 0;
box-sizing: border-box;
height:220rpx;
margin-bottom: 32rpx;
}
.contractcontent textarea{
width:100%;
height:100%;
color:#BDC4CE;
font-size: 28rpx;
}
.addtop{
width:750rpx;
... ...
... ... @@ -32,28 +32,12 @@
<view class="helpitemname">{{item.name}}</view>
</view>
<!-- <view class="helpitem flexfour" @click="examinetext">
<view class="helpitemtop">
<image src="../../static/car.png" mode=""></image>
</view>
<view class="helpitemname">配送员考试</view>
</view>
<view class="helpitem flexfour" @click="examinetext">
<view class="helpitemtop">
<image src="../../static/xiaoshou.png" mode=""></image>
</view>
<view class="helpitemname">销售员考试</view>
</view>
-->
</view>
<view class="examinrule">
<view class='examineruletitle'>考试规则</view>
<view class="examineruletext">
考试规则考试规则考试规则考试
规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则
考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规则考试规
则考试规则考试规则考试规则考试规则
{{rulecontent}}
</view>
</view>
... ... @@ -73,7 +57,8 @@
userinfo: '',
label: '',
token:'',
isexamine:false
isexamine:false,
rulecontent:''
}
},
... ... @@ -83,6 +68,7 @@
// 获取用户信息
this.getuserinfo()
},
methods: {
hidepublish() {
this.publish = false
... ... @@ -93,6 +79,25 @@
url:'/pages/login/loginindex'
})
},
// 考试规则
getrulecontent(){
let that = this;
var url = 'sundry/get_page';
var params = {
id: 5
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.rulecontent=res.data.data.content==null?'':res.data.data.content
}).catch((err) => {
console.log(err)
})
},
// 获取用户信息
getuserinfo() {
... ... @@ -147,11 +152,12 @@
}
},
},
onShow() {
// 获取考试规则
this.getrulecontent()
this.isexamine=false
}
}
... ...
... ... @@ -2,7 +2,9 @@
<view class="content">
<view class="examineresult">考试结果</view>
<view class="examinefen">{{score}}分</view>
<view class='examinestate'>对不起您没有通过本次考试,请重新答题</view>
<view class='examinestate' v-if="is_pass==2">对不起您没有通过本次考试,请重新答题</view>
<view class='examinestate' v-if="is_pass==1">恭喜您通过本次考试</view>
<view class="examinebot flexone">
<view class='examinebotleft' @click="backluntan">返回论坛</view>
<view class='examinebotright' @click="renewkaoshi">重新考试</view>
... ... @@ -16,12 +18,14 @@
data() {
return {
score:'',
id:''
id:'',
is_pass:''
}
},
onLoad(options) {
this.score=options.score;
this.id=options.id
this.id=options.id;
this.is_pass=options.is_pass
},
methods: {
... ...
... ... @@ -16,9 +16,6 @@
{{item.sel}}、{{item.option_name}}
</view>
</view>
<!-- <view class="wrongimg" v-if="item.answer==2&&item.chose==true">
<image src="../../static/wrong.png" mode=""></image>
</view> -->
</view>
... ... @@ -41,27 +38,18 @@
</view>
</view>
<view class="huiyuanbot boxsizing">
<!-- v-if="next_data!=''&&last_data==''" -->
<!-- <view class="behuiyuanbtn" v-if="issure" @click="next_data==''?sureti:sure">确认{{next_data==''?'1':'2'}}</view> -->
<view v-if="issure">
<view class="behuiyuanbtn" @click="sureti">确认</view>
<!-- <view class="behuiyuanbtn" @click="sure" v-else>确认</view> -->
</view>
<view v-else>
<view class="behuiyuanbtn" @click="nextquestion" v-if="next_data!=''">下一题</view>
<view class="behuiyuanbtn" @click="sure" v-else>完成</view>
</view>
<!-- <view v-else>
<view class="behuiyuanbtn" @click="nextquestion" v-if="next_data!=''">下一题</view>
</view> -->
<!-- <view class="flextwo" v-else-if="last_data!=''&&next_data!==''">
<view class="behuiyuanbtn btnitem" @click="prequestion">上一题</view>
<view class="behuiyuanbtn btnitem" @click="nextquestion">下一题</view>
</view> -->
<!-- v-else -->
<view v-else>
<view class="behuiyuanbtn" v-if="showfinish">完成</view>
<view class="behuiyuanbtn" @click="sure" v-else>完成</view>
</view>
</view>
</view>
</view>
... ... @@ -83,7 +71,8 @@
//是否在上一题返回的下一题
islast:0,
present_datakarr:[],
issure:true
issure:true,
showfinish:false
}
},
... ... @@ -274,6 +263,7 @@
},
sure(){
let that = this;
that.showfinish=true
var url = 'question/submit_answer';
var params = {
questionnaire_id: that.questionnaire_id,
... ... @@ -288,7 +278,7 @@
})
setTimeout(function(){
uni.navigateTo({
url:'/pages/luntan/examineresult?score='+that.score+'&id='+that.questionnaire_id
url:'/pages/luntan/examineresult?score='+that.score+'&id='+that.questionnaire_id+'&is_pass='+res.data.data.is_pass
})
},1500)
... ...
... ... @@ -17,54 +17,35 @@
<text class="proname">{{provincename}}</text>
<image class="down-ico" src="../../static/xiahuang.png" />
</view>
<!-- <picker @change="bindproChange" :value="index" :range="provincelist" range-key="name">
</picker> -->
</view>
<!-- nav -->
<view class="nav-wrap nav-wrapk">
<view class="navigator" @click="zhaopin(item,index)" :data-id="item.id" v-for="(item,index) in kindlist" :key="index">
<image :src="item.image" class="logoimgk"></image>
<text>{{item.name}}</text>
</view>
<!-- <view class="navigator" @click="zhaopin" :data-id="4">
<image src="../../static/logok.png" class="logoimgk"></image>
<text>视频专区</text>
</view>
<view class="navigator" @click="zhaopin" :data-id="1">
<image src="../../static/helppeople.png"></image>
<text>帮工招聘求职</text>
</view>
<view class="navigator" @click="zhaopin" :data-id="2">
<image src="../../static/mianturn.png"></image>
<text>面坊求购转让</text>
</view>
<view class="navigator" @click="zhaopin" :data-id="3">
<image src="../../static/friend.png"></image>
<text>征婚交友</text>
</view>
-->
</view>
<!-- 最新发布 -->
<view class="new-release-wrap">
<!-- title -->
<view class="flexone tiezitop">
<view class="new-release-title" :class="order==0?'zuiactive':''" @click="orderrange" :data-id="0">默认</view>
<view class="new-release-title" :class="order==1?'zuiactive':''" @click="orderrange" :data-id="1">热门话题</view>
<view class="new-release-title" :class="order==2?'zuiactive':''" @click="orderrange" :data-id="2">最高点赞</view>
</view>
<view class="nodata" v-if="isshowluntan">暂无数据</view>
<view v-else>
<!-- content -->
<view class="luntanlisbox" v-else>
<view class="new-release-content" v-for="(item,index) in luntanlist" :key="index" @click="luntandetail(item)">
<!-- 头像,名称,等级 -->
<view class="userinfo-wrap" @click.stop="usercenter(item)">
<image class="avatarimgk" :src="item.user.avatar"></image>
<text class="title">{{item.nickname}}</text>
<view class="VIP">
<text class="title">{{item.user.nickname}}</text>
<view class="VIP" v-if="item.forum_type==1">
<image src="../../static/huiyuan.png"></image>
{{item.user.level.name1}}
</view>
... ... @@ -85,32 +66,31 @@
<view class="release-text-content">
<rich-text :nodes="item.content"></rich-text>
</view>
<view class="imagebox" v-if="item.video!=null" @click.stop="govideo(item.video)">
<image :src="item.video_image" mode="aspectFill"/>
<view class="imagebox videoimagebox" v-if="item.video!=null" @click.stop="govideo(item.video)">
<image :src="item.video_image" mode="aspectFill" />
<view class="videoimg">
<image src="../../static/videoplay.png" mode=""></image>
</view>
</view>
<view class="imagebox flexone" v-if="item.images!=null" style="flex-wrap: wrap;">
<image style="width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx" :src="item" v-for="(item,indexk) in item.images" :key="indexk" @click.stop="previewimg(index,indexk)"/>
<image style="width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx" :src="item" v-for="(item,indexk) in item.images"
:key="indexk" @click.stop="previewimg(index,indexk)" />
</view>
</view>
<!-- 点赞, 人数 -->
<view class="thumbs-number" @click.stop="praisedian(item,index)">
<view class="thumbs-number" >
<view class="thumbs" style="position:relative;">
<image src="../../static/comment.png" style="width:40rpx;height:35rpx;"></image>
<view class="commentnum" style="width:30rpx;height:20rpx;border-radius: 50%;color:#fff;font-size: 18rpx;text-align: center;
line-height: 20rpx;background: #C29445;position: absolute;
right:0;top:0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-if="item.comment!=0">
right:0;top:0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"
v-if="item.comment!=0">
{{item.comment}}
</view>
</view>
<view class="thumbs">
<view class="thumbs" @click.stop="praisedian(item,index)">
<image src="../../static/tienozan.png" v-if="item.is_praise==2"></image>
<image src="../../static/tiezan.png" v-else></image>
{{item.praise}}
... ... @@ -128,26 +108,12 @@
<view class="release-news" v-if="publish">
<view class="release-content">
<view class="nav-wrap publishnav">
<view class="navigator" @click="publishitezi(item,index)" :data-id="item.id" v-for="(item,index) in publisharr" :key="index">
<view class="navigator" @click="publishitezi(item,index)" :data-id="item.id" v-for="(item,index) in publisharr"
:key="index">
<image :src="item.image" style="border-radius: 50%;"></image>
<text>{{item.name}}</text>
</view>
<!-- <view class="navigator" @click="publishitezi" :data-id="1">
<image src="../../static/helppeople.png"></image>
<text>帮工招聘求职</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="2">
<image src="../../static/mianturn.png"></image>
<text>面坊求购转让</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="3">
<image src="../../static/friend.png"></image>
<text>征婚交友</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="4">
<image src="../../static/logok.png" class="logoimgk"></image>
<text>短视频专区</text>
</view> -->
</view>
<!-- close -->
<view class="close" @click="hidepublish">
... ... @@ -177,15 +143,13 @@
<view class="teacherfootname" :class="footersel==3?'activename':''">我的</view>
</view>
</view>
<!-- <tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983" ></tabBar> -->
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
publish: false,
... ... @@ -198,77 +162,104 @@
index: 0,
luntanlist: [],
keyword: '',
currentTabIndex:2,
order:1,
isshowluntan:false,
protype:'',
kindlist:[],
publisharr:[]
currentTabIndex: 2,
order: 0,
isshowluntan: false,
protype: '',
kindlist: [],
publisharr: [],
openclose: ''
}
},
onLoad() {
uni.setStorageSync("provincename","")
this.getkind()
uni.setStorageSync("provincename", "")
},
methods: {
// 是否隐藏
ishideclose() {
console.log('88888')
let that = this;
var url = 'page/get_switch2';
var params = {
}
app.post(url, params).then((res) => {
console.log(res.data.data.switch);
that.openclose = res.data.data.switch;
console.log('43783488949348', that.openclose)
that.getkind()
}).catch((err) => {
console.log(err)
})
},
// 获取帖子分类
getkind(){
getkind() {
let that = this;
var url = 'forum/get_forum_category';
var params = {
}
console.log('帖子种类参数s', params)
app.post(url, params).then((res) => {
console.log(res);
that.kindlist=res.data.data;
let data=res.data.data;
let arr=[]
data.forEach(function(value,index,array){
value.chose=false;
if(index<4){
value.type=1
console.log(res, '999999999', that.openclose);
let list = res.data.data;
let listk = res.data.data;
let data = listk;
console.log(data, 887766666666666666666666)
let arr = []
data.forEach(function(value, index, array) {
value.chose = false;
if (index < 4) {
value.type = 1
arr.push(value)
}else{
value.type=2
} else {
value.type = 2
}
})
that.publisharr=arr
that.publisharr = arr;
that.kindlist = list;
}).catch((err) => {
console.log(err)
})
},
hidepublish() {
this.publish = false
},
// 最新和最热
orderrange(e){
this.order=e.currentTarget.dataset.id;
this.page=1;
this.luntanlist=[];
orderrange(e) {
this.order = e.currentTarget.dataset.id;
this.page = 1;
this.luntanlist = [];
this.getluntanlist()
},
// 选择城市
selprovince(){
selprovince() {
uni.navigateTo({
url:'/pages/nearshop/allprovince?seltype='+2
url: '/pages/nearshop/allprovince?seltype=' + 2
})
},
getlocation() {
let that=this;
let that = this;
uni.getLocation({
type: 'wgs84',
success: function(res) {
... ... @@ -285,31 +276,31 @@
console.log(address, 'address');
var reg = /.+?(省|市|自治区|自治州|县|区)/g;
console.log(address.match(reg));
var addressname=address.match(reg);
var addressname = address.match(reg);
console.log(addressname);
if(addressname[0]=='天津市'){
addressname[0]=addressname[0].split("市")[0]
}else if(addressname[0]=='北京市'){
addressname[0]=addressname[0].split("市")[0]
}else if(addressname[0]=='上海市'){
addressname[0]=addressname[0].split("市")[0]
}else if(addressname[0]=='重庆市'){
addressname[0]=addressname[0].split("市")[0]
if (addressname[0] == '天津市') {
addressname[0] = addressname[0].split("市")[0]
} else if (addressname[0] == '北京市') {
addressname[0] = addressname[0].split("市")[0]
} else if (addressname[0] == '上海市') {
addressname[0] = addressname[0].split("市")[0]
} else if (addressname[0] == '重庆市') {
addressname[0] = addressname[0].split("市")[0]
}
uni.setStorageSync("currentcity",addressname[0])
if(uni.getStorageSync("provincename")==''){
that.provincename=addressname[0];
uni.setStorageSync("provincename",that.provincename)
}else{
that.provincename=uni.getStorageSync("provincename")
uni.setStorageSync("currentcity", addressname[0])
if (uni.getStorageSync("provincename") == '') {
that.provincename = addressname[0];
uni.setStorageSync("provincename", that.provincename)
} else {
that.provincename = uni.getStorageSync("provincename")
// uni.setStorageSync("provincename","")
}
console.log(that.provincename)
that.getprovinceid()
that.getprovinceid()
// _this.addressList = address.match(reg).toString().split(",");
// _this.address = _this.addressList[1];
// console.log(_this.addressList[0]);
... ... @@ -322,11 +313,11 @@
}
});
},
// 根据城市名字获取id
getprovinceid(){
getprovinceid() {
let that = this;
var url = 'question/get_area';
var params = {
... ... @@ -334,19 +325,19 @@
}
console.log('7766554', params)
app.post(url, params).then((res) => {
that.province_id=res.data.data.id;
// 获取论坛列表
this.getluntanlist()
that.province_id = res.data.data.id;
// 获取论坛列表
this.getluntanlist()
}).catch((err) => {
console.log(err)
})
},
// 输入关键字
enterword(e) {
this.keyword = e.detail.value;
... ... @@ -365,17 +356,17 @@
url: '/pages/luntan/luntandetail?id=' + item.id
})
},
// 进入video
govideo(src){
govideo(src) {
console.log(src)
uni.navigateTo({
url:'/pages/luntan/video?src='+src
url: '/pages/luntan/video?src=' + src
})
},
// 获取论坛列表
getluntanlist() {
let that = this;
... ... @@ -384,28 +375,30 @@
keyword: that.keyword,
province_id: that.province_id,
type: '',
order:that.order,
order: that.order,
page: that.page,
pageNum: 10
}
console.log('参数', params)
app.post(url, params).then((res) => {
console.log('论坛列表',res);
console.log('论坛列表', res);
that.luntanlist = that.luntanlist.concat(res.data.data);
// console.log('3443734743783478',that.luntanlist)
that.$forceUpdate()
// console.log('9999', this.luntanlist)
console.log(this.luntanlist.length)
if(this.luntanlist.length==0){
that.isshowluntan=true
}else{
that.isshowluntan=false
// console.log('9999', this.luntanlist)
console.log(this.luntanlist.length)
if (this.luntanlist.length == 0) {
that.isshowluntan = true
} else {
that.isshowluntan = false
}
if(that.page>1){
if(res.data.data.length==0){
if (that.page > 1) {
if (res.data.data.length == 0) {
uni.showToast({
title:'没有更多了~',
icon:"none"
title: '没有更多了~',
icon: "none"
})
}
}
... ... @@ -413,23 +406,23 @@
}).catch((err) => {
console.log(err)
if(err.msg=='用户未登录'){
if (err.msg == '用户未登录') {
uni.reLaunch({
url:'/pages/login/loginindex'
url: '/pages/login/loginindex'
})
}
})
},
// 预览图片
previewimg(index,indexk){
let that=this;
previewimg(index, indexk) {
let that = this;
uni.previewImage({
current: that.luntanlist[index].images[indexk],
urls: that.luntanlist[index].images,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
current: that.luntanlist[index].images[indexk],
urls: that.luntanlist[index].images,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
praisedian(item, index) {
... ... @@ -474,45 +467,58 @@
// 进入论坛主页
usercenter(item) {
console.log('999999', item)
let user = JSON.stringify(item.user)
uni.navigateTo({
url: '/pages/luntan/luntanpage?userid=' + item.user_id + '&user=' + user
})
},
// 论坛列表
zhaopin(item,index) {
let token=uni.getStorageSync("token");
if(token==''){
zhaopin(item, index) {
console.log(item)
let token = uni.getStorageSync("token");
if (token == '') {
uni.navigateTo({
url:'/pages/login/loginindex'
url: '/pages/login/loginindex'
})
}else{
if(item.type==1){
} else {
if (item.type == 1) {
let id = item.id;
uni.navigateTo({
url: '../luntan/luntanlist?id='+id
url: '../luntan/luntanlist?id=' + id
})
}else{
let id=item.id
if(id==8){
} else {
let id = item.id
if (id == 8) {
uni.navigateTo({
url: '/pages/luntan/examine'
})
} else if (item.name == '中面资讯') {
uni.navigateTo({
url:'/pages/luntan/examine'
url: '/pages/luntan/zhongmianzixun'
})
}else if (item.name == '投诉维权') {
uni.navigateTo({
url: '/pages/luntan/tousuweiquan'
})
}else if (item.name == '中面资质') {
uni.navigateTo({
url: '/pages/luntan/zhongmianzizhi'
})
}
}
}
},
// 发布评论
publishitezi(item) {
let token=uni.getStorageSync("token");
if(token==''){
let token = uni.getStorageSync("token");
if (token == '') {
uni.navigateTo({
url:'/pages/login/loginindex'
url: '/pages/login/loginindex'
})
}else{
} else {
let type = item.id;
uni.navigateTo({
url: '/pages/luntan/addcontract?type=' + type
... ... @@ -541,39 +547,39 @@
}
},
onShow() {
let that=this;
uni.$on('provinceid',function(data){
console.log('343744',data)
that.province_id=data.provinceid;
that.protype=data.protype;
console.log(that.province_id)
})
this.publish=false;
this.page=1;
this.luntanlist=[];
let that = this;
that.ishideclose();
that.page = 1;
that.luntanlist = [];
uni.$on('provinceid', function(data) {
console.log('343744', data)
that.province_id = data.provinceid;
that.protype = data.protype;
console.log(that.province_id)
})
this.publish = false;
this.page = 1;
this.luntanlist = [];
// 获取当前地理位置
this.getlocation();
uni.hideTabBar({
})
// this.getluntanlist()
},
onReachBottom() {
let newpage=this.page;
let newpage = this.page;
newpage++;
this.page=newpage;
this.page = newpage;
this.getluntanlist()
}
}
</script>
... ... @@ -581,40 +587,55 @@
page {
background: #F9F9F9;
}
.imagebox{
width:686rpx;
.luntanlisbox {
padding-bottom: 150rpx
}
.imagebox {
width: 686rpx;
/* height:280rpx; */
margin-top: 16rpx;
position: relative;
}
.videoimagebox{
width: 686rpx;
height:280rpx;
margin-top:16rpx;
margin-top: 16rpx;
position: relative;
}
.imagebox image{
width:100%;
height:100%;
.imagebox image {
width: 100%;
height: 100%;
}
.videoimg{
width:150rpx;
height:150rpx;
.videoimg {
width: 150rpx;
height: 150rpx;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.video img{
width:100%;
height:100%;
.video img {
width: 100%;
height: 100%;
}
.tiezitop{
width:750rpx!important;
.tiezitop {
width: 750rpx !important;
background: #fff;
border-bottom: 1px solid #E3E2E1;
}
.logoimgk{
.logoimgk {
border-radius: 50%;
}
.release-text-content {
height:auto;
height: auto;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
... ... @@ -647,7 +668,7 @@
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 5rpx;
color:#FF9417
color: #FF9417
}
.down-ico {
... ... @@ -655,9 +676,10 @@
height: 16rpx;
font-size: 0;
}
.publishnav {
padding: 0 94rpx 32rpx 0!important;
box-sizing: border-box!important;
padding: 0 94rpx 32rpx 0 !important;
box-sizing: border-box !important;
}
.homeimg {
... ... @@ -665,11 +687,12 @@
height: 88rpx;
font-size: 0;
}
.search-input {
width: 470rpx !important;
height:60rpx;
background:rgba(249,249,249,1);
border-radius:32px;
height: 60rpx;
background: rgba(249, 249, 249, 1);
border-radius: 32px;
}
/* 搜素 */
... ... @@ -685,7 +708,7 @@
}
.nav-wrap {
width:750rpx;
width: 750rpx;
background: #fff;
display: flex;
justify-content: space-between;
... ... @@ -694,15 +717,16 @@
box-sizing: border-box;
margin-bottom: 16rpx;
}
.nav-wrapk{
.nav-wrapk {
margin-top: calc(var(--status-bar-height) + 100rpx);
}
.nav-wrap .navigator {
text-align: center;
width:25%;
width: 25%;
/* margin-right:40rpx; */
margin-bottom:32rpx;
margin-bottom: 32rpx;
}
.nav-wrap .navigator image {
... ... @@ -717,7 +741,7 @@
color: #3D454C;
font-size: 26rpx;
text-align: center;
margin:0 auto;
margin: 0 auto;
}
.new-release-wrap .new-release-title {
... ... @@ -802,13 +826,15 @@
.search-wrap .navigator:nth-child(3) {
/* font-size: 20rpx; */
}
.avatarimgk{
.avatarimgk {
border-radius: 50%;
}
.zuiactive{
color:#FF9417!important;
.zuiactive {
color: #FF9417 !important;
}
/* .proname{
overflow: hidden;
... ...
... ... @@ -14,31 +14,28 @@
<view class="userinfo-vip">
<view style="display:flex;">
<text class="title">{{user.nickname}}</text>
<view class="VIP">
<view class="VIP" v-if="tiezidetail.forum_type==1">
<image src="../../icons/vip.png"></image>
{{level.name1}}
</view>
</view>
</view>
<view style="color:#333;font-size: 28rpx;margin-top:5rpx;margin-left:20rpx">{{tiezidetail.createtime}}</view>
<!-- <view class="time">
1小时
</view> -->
</view>
</view>
<!-- type -->
<view class="type-wrap">
<text style="margin-left:0" v-for="(item,index) in label" :key="index">{{item.name_label}}</text>
<!-- <text>配送员</text>
<text>销售员</text> -->
</view>
<!-- content -->
<view class="release-text">
<view class="release-text-content">
<view class="textcontentblock">
<rich-text :nodes="tiezidetail.content"></rich-text>
</view>
<view class="imagebox" v-if="tiezidetail.video!=null" @click="govideo(tiezidetail.video)">
<view class="imagebox videoimagebox" v-if="tiezidetail.video!=null" @click="govideo(tiezidetail.video)">
<image :src="tiezidetail.video_image" mode="aspectFill"/>
<view class="videoimg">
<image src="../../static/videoplay.png" mode=""></image>
... ... @@ -54,7 +51,7 @@
<image src="../../static/comment.png" style="width:40rpx;height:35rpx;"></image>
<view class="commentnum" style="width:30rpx;height:20rpx;border-radius: 50%;color:#fff;font-size: 18rpx;text-align: center;
line-height: 20rpx;background: #C29445;position: absolute;
right:0;top:0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" v-if="tiezidetail.comment!=0">
right:0;top:0;" v-if="tiezidetail.comment!=0">
{{tiezidetail.comment}}
</view>
</view>
... ... @@ -88,21 +85,15 @@
</view>
<!-- type -->
<view class="type-wrap" v-if="item.user.label.length!=0">
帮工招聘求职
<!-- 帮工招聘求职 -->
<text v-for="(item,index) in item.user.label" :key="index">{{item.name_label}}</text>
</view>
<!-- content -->
<view class="release-text">
<view class="release-text-content">
<view class="tiezidetailcontent">
<rich-text :nodes="item.content"></rich-text>
</view>
<!-- <view class="imagebox">
<image src="../../icons/banner.png" mode=""></image>
<image :src="item" mode="widthFix" v-for="(item,index) in tiezidetail.images" :key="index"/>
</view> -->
</view>
<!-- 点赞, 人数 -->
<view class="thumbs-number">
... ... @@ -111,10 +102,7 @@
<image src="../../static/tiezan.png" mode="" v-else></image>
{{item.praise}}
</view>
<!-- <view class="number">
<image src="../../icons/number.png"></image>
{{item.view}}
</view> -->
</view>
</view>
</view>
... ... @@ -122,11 +110,8 @@
<!-- footer -->
<view class="footer">
<view class="search">
<input type="text" confirm-type="send" class="shuru" placeholder-class="placeholder" @input="entercomment" placeholder="写点什么..." />
<!-- <view class="search-btn">
<image src="../../static/write.png" />
</view> -->
<input type="text" :value="comment" confirm-type="send" class="" placeholder-class="placeholder" @input="entercomment" placeholder="写点什么..." />
<view class='sendname' @click="sendcomment">发送</view>
</view>
</view>
... ... @@ -146,11 +131,15 @@
comment:'',
level:'',
user:'',
label:''
label:'',
type:''
}
},
onLoad(options) {
this.forum_id = options.id;
if(options.type){
this.type=options.type
}
this.getformdetail();
this.getcommentlist()
},
... ... @@ -170,7 +159,7 @@
}
console.log('参数', params)
app.post(url, params).then((res) => {
console.log('1111111111111111111111111111111111',res);
console.log('111111111',res);
that.tiezidetail = res.data.data;
that.user=res.data.data.user;
that.level=res.data.data.user.level;
... ... @@ -338,6 +327,8 @@
title:'评论成功',
icon:'none'
})
that.comment=''
that.page=1;
that.commentlist=[];
that.getcommentlist()
... ... @@ -351,6 +342,10 @@
},
onUnload() {
uni.$emit('update',{type:this.type})
console.log(3734784378)
},
onReachBottom() {
let newpage=this.page;
newpage++;
... ... @@ -368,13 +363,26 @@
.sendname{
color:#C29445;
font-size: 28rpx;
margin-left:10rpx;
margin-left:15rpx;
flex:0 0 auto
}
.tiezidetailcontent{
font-size: 30rpx;
/* height:120rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden; */
}
.videoimagebox{
width:686rpx;
height:280rpx;
}
.imagebox{
width:686rpx;
height:280rpx;
margin-top:16rpx;
/* height:280rpx; */
/* margin-top:16rpx; */
position: relative;
}
.imagebox image{
... ... @@ -394,6 +402,7 @@
height:100%;
}
.shuru {
font-size: 24rpx;
color: #BDC4CE;
}
... ... @@ -551,15 +560,22 @@
align-items: center;
z-index: 1000;
}
.footer .search input{
font-size: 24rpx;
color: #BDC4CE;
}
.footer .search .placeholder {
font-size: 24rpx;
color: #BDC4CE;
}
.textcontentblock{
font-size: 30rpx;
}
.footer .search input {
height: 60rpx;
width: 80vw;
width: 580rpx;
border: 1px solid #eee;
background: #F9F9F9;
border-radius: 50px;
... ...
... ... @@ -7,24 +7,13 @@
<view class="searchimg">
<image src="../../static/search.png" mode=""></image>
</view>
<input type="text" confirm-type="search" placeholder-class="placeholder" placeholder="请输入关键词搜索" @confirm="finish"
<input type="text" confirm-type="search" class="enterwordsou" placeholder-class="placeholder" placeholder="请输入关键词搜索" @confirm="finish"
@input="enterword" />
<!-- <view class="search-btn">
北京
<image src="../../static/huixia.png" />
</view> -->
<view class="proselect flexthree" style="border:1rpx solid #FF9417" @click="selprovince">
<text class="proname" style="color:#FF9417">{{provincename}}</text>
<image class="down-ico" src="../../static/xiahuang.png" />
</view>
<!-- <picker @change="bindproChange" :value="index" :range="provincelist" range-key="name">
<view class="proselect flexthree" style="border:1rpx solid #FF9417">
<text class="proname" style="color:#FF9417">{{provincename}}</text>
<image class="down-ico" src="../../static/xiahuang.png" />
</view>
</picker> -->
</view>
<!-- nav -->
<view class="nav-menus">
... ... @@ -32,17 +21,6 @@
<view :class="item.chose==true?'active':''" @click="kindchange(item,index)" :data-id="item.id" v-for="(item,index) in kindlist" :key="index">
{{item.name}}
</view>
<!-- <view :class="kindtype=='1'?'active':''" @click="kindchange" :data-id="1">
帮工招聘求职
</view>
<view :class="kindtype=='2'?'active':''" @click="kindchange" :data-id="2">
面坊转让求购
</view>
<view :class="kindtype=='3'?'active':''" @click="kindchange" :data-id="3">
征婚交友
</view> -->
</scroll-view>
</view>
<view class="nav-menus">
... ... @@ -68,15 +46,7 @@
<view :class="search_type==6?'active':''" @click="searchtype" :data-id="6" v-if="kindtype==4">
找女友
</view>
<!-- <view :class="kindtype=='1'?'active':''" @click="kindchange" :data-id="1">
帮工招聘求职
</view>
<view :class="kindtype=='2'?'active':''" @click="kindchange" :data-id="2">
面坊转让求购
</view>
<view :class="kindtype=='3'?'active':''" @click="kindchange" :data-id="3">
征婚交友
</view> -->
</scroll-view>
</view>
... ... @@ -85,18 +55,20 @@
<!-- 列表 -->
<view class="nodata" v-if="luntanlist.length==0" style="margin-top:350rpx">暂无数据</view>
<view :class="kindtype!=1?'listk':'list'" v-else>
<!-- content -->
<view class="new-release-content" v-for="(item,index) in luntanlist" :key="index" @click="luntandetail(item)">
<!-- 头像,名称,等级 -->
<view class="userinfo-wrap" @click.stop="usercenter(item)">
<image :src="item.user.avatar" style="border-radius: 50%;"></image>
<text class="title">{{item.user.nickname}}</text>
<view class="VIP">
<image src="../../icons/vip.png"></image>
<view class="VIP" v-if="item.forum_type==1">
<image src="../../static/huiyuan.png"></image>
{{item.user.level.name1}}
</view>
</view>
<!-- type -->
<view class="type-wrap">
<view>
<text>{{item.category_name}}</text>
... ... @@ -104,10 +76,9 @@
</view>
<text v-for="(item,index) in item.user.label" :key="index">{{item.name_label}}</text>
<!-- <text>配送员</text>
<text>销售员</text> -->
</view>
<!-- content -->
<view class="release-text">
<view class="release-text-title">
{{item.title}}
... ... @@ -165,24 +136,9 @@
<image :src="item.image" style="border-radius: 50%;"></image>
<text>{{item.name}}</text>
</view>
<!-- <view class="navigator" @click="publishitezi" :data-id="1">
<image src="../../static/helppeople.png"></image>
<text>帮工招聘求职</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="2">
<image src="../../static/mianturn.png"></image>
<text>面坊求购转让</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="3">
<image src="../../static/friend.png"></image>
<text>征婚交友</text>
</view>
<view class="navigator" @click="publishitezi" :data-id="4">
<image src="../../static/logok.png" class="logoimgk"></image>
<text>短视频专区</text>
</view> -->
</view>
<!-- close -->
<view class="close" @click="hidepublish">
<image src="../../static/publishchahao.png" />
</view>
... ... @@ -277,18 +233,13 @@
uni.setStorageSync("provincenamek",that.provincename)
}else{
that.provincename=uni.getStorageSync("provincenamek")
// uni.setStorageSync("provincename","")
}
console.log(that.provincename)
that.getprovinceid()
// _this.addressList = address.match(reg).toString().split(",");
// _this.address = _this.addressList[1];
// console.log(_this.addressList[0]);
// console.log(_this.addressList[1]);
// console.log(_this.addressList[2]);
},
function(e) {}
);
... ... @@ -406,7 +357,7 @@
finish() {
this.page = 1;
this.luntanlist = [];
// this.getluntanlist()
this.getluntanlist()
},
// 输入关键字
... ... @@ -763,6 +714,10 @@
font-size: 24rpx;
color: #BDC4CE;
}
.enterwordsou{
font-size: 24rpx;
color: #BDC4CE;
}
.search-nav .search icon {
position: absolute;
... ...
... ... @@ -7,27 +7,29 @@
<view class="name-vip-type">
<view class="name-vip">
<text class="title">{{user.nickname}}</text>
<view class="VIP" v-if="user.level.name1!=undefined">
<!-- <view class="VIP" v-if="user.level.name1!=undefined">
<image src="../../icons/vip.png"></image>
{{user.level.name1}}
</view>
<view v-if="user_id!=mineuserid">
<view class='attention' @click="attentionguan" v-if="user.is_attention==2">关注</view>
<view class='noattention' @click="noattention" v-else>取消关注</view>
</view> -->
<view v-if="user_id!='null'">
<view v-if="user_id!=mineuserid">
<view class='attention' @click="attentionguan" v-if="user.is_attention==2">关注</view>
<view class='noattention' @click="noattention" v-else>取消关注</view>
</view>
</view>
</view>
<view class="connectmobile" @click="mobile">联系方式:{{user.mobile_hide}}</view>
<view class="connectmobile" v-if="user.address!=''">地址:{{user.address}}</view>
<view v-if="user.label!=undefined">
<view class="type" v-for="(item,index) in user.label" :key="index">
</view>
</view >
<view class="type" v-for="(item,index) in user.label" :key="index">
<text>{{item.name_label}}</text>
<!-- <text>配送员</text>
<text>销售员</text> -->
</view>
</view>
</view>
<!-- content -->
<view class="nodata" v-if="personlist.length==0">暂无数据</view>
<view v-else>
<view class="new-release-content" v-for="(item,index) in personlist" :key="index" @click="luntandetail(item)">
... ... @@ -37,10 +39,14 @@
<view>
<view style="display:flex;align-items: center;">
<text class="title">{{item.user.nickname}}</text>
<view class="VIP" v-if="item.user.level.name1!=undefined">
<image src="../../icons/vip.png"></image>
{{item.user.level.name1}}
<view v-if="item.user.level!=undefined">
<view class="VIP" v-if="item.user.level.name1!=undefined">
<image src="../../icons/vip.png"></image>
{{item.user.level.name1}}
</view>
</view>
</view>
<view style="color:#333;font-size: 28rpx;margin-top:5rpx;margin-left:20rpx">{{item.createtime}}</view>
... ... @@ -51,8 +57,6 @@
<view class="type-wrap">
{{item.category_name}}
<text v-for="(itemk,indexk) in item.user.label" :key="indexk">{{itemk.name_label}}</text>
<!-- <text>配送员</text>
<text>销售员</text> -->
</view>
<!-- content -->
<view class="release-text">
... ... @@ -95,17 +99,15 @@
page: 1,
personlist: [],
user: '',
mineuserid:''
mineuserid:'',
}
},
onLoad(options) {
console.log(options)
this.user_id = options.userid;
// this.user = JSON.parse(options.user);
console.log(this.user)
this.getpersonpage();
// 获取用户信息
this.getuserinfo()
this.getpersonpage();
},
methods: {
... ... @@ -114,6 +116,12 @@
},
mobile(){
uni.makePhoneCall({
phoneNumber: this.user.mobile//仅为示例
});
},
// 获取用户信息
getuserinfo() {
let that = this;
... ... @@ -130,15 +138,11 @@
}).catch((err) => {
console.log(err)
})
},
// 获取个人主页
getpersonpage() {
console.log(343478748374)
let that = this;
let url = 'forum/get_user_forum';
var params = {
... ... @@ -146,15 +150,17 @@
page: that.page,
pageNum: 10
}
console.log('8934394889',params)
app.post(url, params).then((res) => {
console.log('个人主页信息',res)
that.user=res.data.data.user;
console.log('676767676767',that.user)
that.personlist = that.personlist.concat(res.data.data.list);
// console.log(that.personlist.length)
})
}).catch((err) => {
console.log(err)
})
},
// 关注和取消关注
... ... @@ -237,6 +243,10 @@
page {
background: #F9F9F9;
}
.connectmobile{
color:#333;
font-size: 32rpx;
}
.attention{
width:160rpx;
height:52rpx;
... ... @@ -261,7 +271,7 @@
}
.release-text-content {
height: 120rpx;
/* sssss */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
... ...
<template>
<view class="container">
<view class="top">{{tousudetail.name}}</view>
<view class="contentbox">
<rich-text :nodes="content"></rich-text>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
tousuid: "",
tousudetail:'',
content:''
}
},
onLoad(options) {
console.log(options)
this.tousuid=options.tousuid
this.gettousudetail(this.tousuid)
},
methods: {
text(details) {
var texts = '';//待拼接的内容
while (details.indexOf('<img') != -1) {//寻找img 循环
texts += details.substring('0', details.indexOf('<img') + 4);//截取到<img前面的内容
details = details.substring(details.indexOf('<img') + 4);//<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "max-width:100%;height:auto;margin:0 auto;";//从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
texts += ' style="max-width:100%;height:auto;margin:0 auto;" ';
}
}
while (details.indexOf('<td') != -1) {//寻找img 循环
texts += details.substring('0', details.indexOf('<td') + 4);//截取到<img前面的内容
details = details.substring(details.indexOf('<td') + 4);//<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "max-width:74!important;height:auto;margin:0 auto;";//从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
texts += ' style="max-width:100%;height:auto;margin:0 auto;" ';
}
}
texts += details;//最后拼接的内容
return texts
},
gettousudetail(id){
let that = this;
var url = 'protect/get_detail';
var params = {
protect_id:id,
}
app.post(url, params, "post").then((res) => {
console.log(res);
that.tousudetail=res.data.data;
this.content=this.text(res.data.data.content)
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style>
.datebox{
margin-top:20rpx
}
.container{
padding: 32rpx;
box-sizing: border-box;
}
.top {
font-size: 32rpx;
font-weight: bold;
}
.botleft {
color: #C29445;
font-size: 24rpx;
}
.botright {
color: #8c9198;
font-size: 24rpx;
margin-left: 24rpx;
}
.contentbox{
margin-top:20rpx
}
</style>
... ...