作者 xuqiang

提交

... ... @@ -11,7 +11,7 @@ Vue.config.productionTip = false
Vue.prototype.check=check;
Vue.prototype.apiUrl="http://app.zhaodizhu.cn/api"
// Vue.prototype.apiUrl="http://landlord.t.brotop.cn/api"
Vue.prototype.imgUrl="http://qiniu.w.zhaodizhu.cn"
Vue.prototype.imgUrl="http://qiniu.zhaodizhu.cn"
Vue.prototype.tim = tim.tim //tim sdk 引入后生成的tim服务
Vue.prototype.$TIM = TIM //tim 的状态/事件 常量
Vue.prototype.$commen = commen
... ... @@ -52,7 +52,7 @@ Vue.prototype.$request=function(url,data='',type = 1){
}
if(res.data.code == 401){
uni.setStorageSync("token",'')
uni.reLaunch({
uni.navigateTo({
url:"/pages/index/login"
})
}
... ...
... ... @@ -20,7 +20,6 @@
"modules" : {
"Payment" : {},
"VideoPlayer" : {},
"Share" : {},
"OAuth" : {},
"Maps" : {},
"Statistic" : {}
... ... @@ -55,7 +54,20 @@
]
},
/* ios打包配置 */
"ios" : {},
"ios" : {
"capabilities" : {
"entitlements" : {
// 合并到工程entitlements文件的数据(json格式)
"com.apple.developer.associated-domains" : [ "applinks:yuebang.brofirst.cn" ]
},
"plists" : {}
},
"idfa" : true,
"privacyDescription" : {
"NSUserTrackingUsageDescription" : "获取IDFA标记权限向您提供更优质、安全的个性化服务及内容;开启后,您也可以前往系统“设置-隐私”中随时关闭"
}
},
// 合并到工程Info.plist文件的数据(json格式)
/* SDK配置 */
"sdkConfigs" : {
"statics" : {
... ... @@ -69,18 +81,18 @@
"ad" : {},
"maps" : {
"amap" : {
"appkey_ios" : "32ee07d991d04855b030afc8c2d4f7cc",
"appkey_android" : "32ee07d991d04855b030afc8c2d4f7cc"
"appkey_ios" : "258923785615a8c3390494865df30a75",
"appkey_android" : "bea6784b4bb72479183146c62242e357"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "android" ],
"__platform__" : [ "ios", "android" ],
"appid" : "wx71e7bfe66057f7fb",
"UniversalLinks" : ""
"UniversalLinks" : "https://yuebang.brofirst.cn/ulink/"
},
"alipay" : {
"__platform__" : [ "android" ]
"__platform__" : [ "ios", "android" ]
}
},
"geolocation" : {
... ... @@ -100,8 +112,9 @@
"weixin" : {
"appid" : "wx71e7bfe66057f7fb",
"appsecret" : "88f524bfa16aea35e8ef59a3a6502027",
"UniversalLinks" : ""
}
"UniversalLinks" : "https://yuebang.brofirst.cn/ulink/"
},
"apple" : {}
}
},
"icons" : {
... ...
... ... @@ -66,18 +66,34 @@
"style": {
"navigationStyle": "custom",
"app-plus": {
"subNVues": [{
"id": "landAlert", // 唯一标识
"path": "pages/index/subnvue/landAlert", // 页面路径
"type": "popup", //这里不需要
"style": {
"background": "transparent",
"margin": "auto",
"width": "588rpx",
"height": "836rpx",
"border-radius": "30rpx"
"subNVues": [
{
"id": "landAlert", // 唯一标识
"path": "pages/index/subnvue/landAlert", // 页面路径
"type": "popup", //这里不需要
"style": {
"zindex":1,
"background": "transparent",
"margin": "auto",
"width": "588rpx",
"height": "836rpx",
"border-radius": "30rpx"
}
},
{
"id": "updateVersion", // 唯一标识
"path": "pages/index/subnvue/updateVersion", // 页面路径
"type": "popup", //这里不需要
"style": {
"zindex":2,
"background": "transparent",
"margin": "auto",
"width": "622rpx",
"height": "699rpx",
"border-radius": "30rpx"
}
}
}]
]
}
}
},
... ...
... ... @@ -89,7 +89,7 @@
let promise = this.tim.logout();
promise.then(res=> {
this.$store.commit('reset')
uni.reLaunch({
uni.navigateTo({
url: '../index/index'
})
}).catch(err=> {
... ...
... ... @@ -301,7 +301,7 @@
uni.setStorageSync('userInfo', JSON.stringify(userInfo))
//tim 返回的用户信息
uni.setStorageSync('userTIMInfo', JSON.stringify(res.data))
uni.reLaunch({
uni.navigateTo({
url:"/pages/index/index"
})
}).catch((err) => {
... ...
<template>
<view>
<map id="around-food-map" @regionchange="regionchange" :style="{width: '100%',height:mapHeight + 'px'}" :scale="scale" layer-style="d5f046428dcc29769f0256117754064b" @markertap="markertap" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
<map id="around-food-map" @regionchange="regionchange" :style="{width: '750rpx',height:mapHeight + 'px'}" :scale="scale" @markertap="markertap" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
<!-- layer-style="d5f046428dcc29769f0256117754064b" -->
<!-- 查询地址区域 -->
<view class="searchWrap" :style="{top:statusBarHeight + 'rpx'}">
<view class="searchTab">
... ... @@ -251,6 +252,7 @@
// var apiUrl = 'http://landlord.t.brotop.cn/api'
var apiUrl = 'http://app.zhaodizhu.cn/api'
var version = '1.0'//当前应用版本
export default {
data() {
return {
... ... @@ -339,6 +341,8 @@
id:'me',
latitude:res.latitude,
longitude:res.longitude,
width:21,
height:21,
iconPath: '../../static/image/Group_673.png'
})
this.landList.forEach(item => {
... ... @@ -379,6 +383,23 @@
}
},
onLoad(option) {
uni.request({
url:apiUrl + '/common/init',
method:'GET',
data:{
version:version
},
success: (res) => {
console.log('版本',res)
if(res.data.data.versiondata != null){
// #ifdef APP-PLUS
const subNVue = uni.getSubNVueById('updateVersion');
subNVue.show('none', 250);
// #endif
}
}
})
//如果登录人是游侠第一次登录弹出成为地主弹框
if(this.userinfo.group_id == '1' && uni.getStorageSync('landAlertFlag') != this.userinfo.id){
uni.setStorage({
... ... @@ -485,7 +506,7 @@
},
//地图视野范围发生变化
regionchange(e) {
if(e.type == 'end'){
if(e.detail.type == 'end' || e.type == 'end'){
let _this = this
let landArr = []
_this.scale = 12.9
... ... @@ -501,6 +522,8 @@
id:'me',
latitude:_this.latitude,
longitude:_this.longitude,
width:21,
height:21,
iconPath: '../../static/image/Group_673.png'
})
}else{
... ... @@ -530,6 +553,8 @@
id:item.id,
latitude:item.latitude,
longitude:item.longitude,
width:index == 0 ? 68 : 50,
height:index == 0 ? 69 : 50,
// iconPath: '../../static/image/Group_675.png'
iconPath: index == 0 ? '../../static/image/group_675_choose.png' : '../../static/image/Group_675.png'
})
... ...
... ... @@ -28,7 +28,7 @@
<view class="userProt">
<image @click="checkProt = true" v-if="!checkProt" style="width: 23rpx;height: 23rpx;" src="../../static/image/gouxuankuang_1@2x.png" mode=""></image>
<image @click="checkProt = false" v-if="checkProt" style="width: 23rpx;height: 23rpx;" src="../../static/image/Group_592@2x.png" mode=""></image>
登录即代表您同意<text @click="goTo('../my/aboutUs?navTitle=用户协议')">《用户协议》</text>和<text @click="goTo('../my/aboutUs?navTitle=隐私政策')">《隐私政策》</text>
请阅读并同意<text @click="goTo('../my/aboutUs?navTitle=用户协议')">《用户协议》</text>和<text @click="goTo('../my/aboutUs?navTitle=隐私政策')">《隐私政策》</text>
</view>
<view class="otherLoginTxt">
<view class="line"></view>
... ... @@ -102,6 +102,7 @@
success: (res) => {
console.log('手机验证码登录',res)
if(res.data.code == 1){
uni.removeStorageSync('jump')
uni.setStorageSync('token',res.data.data.userinfo.token)
this.$store.commit('login',res.data.data.userinfo)
let userID = res.data.data.userinfo.id.toString()
... ...
... ... @@ -82,7 +82,7 @@
onShow() {
if(!this.isLogin){
uni.setStorageSync("token",'')
uni.reLaunch({
uni.navigateTo({
url:"/pages/index/login"
})
}else{
... ... @@ -125,7 +125,7 @@
let promise = this.tim.logout();
promise.then(res=> {
this.$store.commit('reset')
uni.reLaunch({
uni.navigateTo({
url: '../index/index'
})
}).catch(err=> {
... ...
<template>
<view class="updateVersion">
<view class="bg">
<view class="updateTitle">
<text style="text-align: center;color: #35655f;font-size: 32rpx;padding-top: 48rpx;">发现新版本,{{versiondata.newversion}}来啦</text>
</view>
<scroll-view scroll-y class="updateContent">
<text style="font-size: 28rpx;color: #323233;line-height: 40rpx;">{{versiondata.upgradetext}}</text>
</scroll-view>
<view class="bottomBtnWrap">
<view class="bottomBtn" @click="download">
<text style="font-size: 28rpx;text-align: center;line-height: 72rpx;color: #fff;">{{downloadTxt}}({{versiondata.packagesize}})</text>
</view>
</view>
<image style="width: 188rpx;height: 106rpx;position: fixed;left: 8rpx;top: 76rpx;" src="../../../static/image/Vector_1@2x.png" mode=""></image>
<image style="width: 102rpx;height: 76rpx;position: fixed;left: 156rpx;top: 107rpx;" src="../../../static/image/Vector@2x.png" mode=""></image>
<image style="width: 240rpx;height: 212rpx;position: fixed;left: 197rpx;top: 0;" src="../../../static/image/huojian_1@2x.png" mode=""></image>
<image style="width: 128rpx;height: 80rpx;position: fixed;right: 120rpx;top: 118rpx;" src="../../../static/image/Vector_2@2x.png" mode=""></image>
<image style="width: 180rpx;height: 116rpx;position: fixed;right: 8rpx;top: 54rpx;" src="../../../static/image/Vector_3@2x.png" mode=""></image>
</view>
<view class="closeBtn" @click="closeUpdateVersion">
<image style="width: 44rpx;height: 44rpx;" src="../../../static/image/guanbi-70_1@2x.png" mode=""></image>
</view>
</view>
</template>
<script>
var apiUrl = 'http://app.zhaodizhu.cn/api'
var version = '1.0'//当前应用版本
export default {
data(){
return{
downloadTxt:'立即升级',
versiondata:{}
}
},
onLoad() {
uni.request({
url:apiUrl + '/common/init',
method:'GET',
data:{
version:version
},
success: (res) => {
console.log('版本',res)
this.versiondata = res.data.data.versiondata
}
})
},
methods:{
closeUpdateVersion(){
const subNVue = uni.getSubNVueById('updateVersion')
// 关闭 nvue 子窗体
subNVue.hide('fade-out',500)
},
download(){
const subNVue = uni.getSubNVueById('updateVersion')
// 关闭 nvue 子窗体
subNVue.hide('fade-out',500)
if (plus.os.name.toLowerCase() == 'ios') {
// 跳转到下载页面
plus.runtime.openURL(this.versiondata.downloadurl)
} else {
var dtask = plus.downloader.createDownload(
this.versiondata.downloadurl, {},
function(d, status) {
uni.showToast({
title: '下载完成',
mask: false,
duration: 1000
});
// 下载完成
if (status == 200) {
plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), {}, e => e, function(error) {
uni.showToast({
title: '安装失败',
mask: false,
duration: 1500
});
})
} else {
uni.showToast({
title: '更新失败',
mask: false,
duration: 1500
});
}
});
try {
dtask.start(); // 开启下载的任务
var prg = 0;
var showLoading = plus.nativeUI.showWaiting("正在下载"); //创建一个showWaiting对象
dtask.addEventListener('statechanged', function(
task,
status
) {
// 给下载任务设置一个监听 并根据状态 做操作
switch (task.state) {
case 1:
showLoading.setTitle("正在下载");
break;
case 2:
showLoading.setTitle("已连接到服务器");
break;
case 3:
prg = parseInt(
(parseFloat(task.downloadedSize) /
parseFloat(task.totalSize)) *
100
);
showLoading.setTitle(" 正在下载" + prg + "% ");
break;
case 4:
plus.nativeUI.closeWaiting();
//下载完成
break;
}
});
} catch (err) {
plus.nativeUI.closeWaiting();
uni.showToast({
title: '更新失败',
mask: false,
duration: 1500
});
}
}
/* if(this.downloadTxt == '下载中'){
return
}
this.downloadTxt = '下载中'
const downloadTask = uni.downloadFile({
url: this.versiondata.downloadurl, //仅为示例,并非真实的资源
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功');
}
}
});
downloadTask.onProgressUpdate((res) => {
console.log('下载进度' + res.progress);
console.log('已经下载的数据长度' + res.totalBytesWritten);
console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
// 测试条件,取消下载任务。
if (res.progress > 50) {
downloadTask.abort();
}
}); */
/* console.log('11111111111111111',this.versiondata.downloadurl)
uni.downloadFile({
url: this.versiondata.downloadurl, //仅为示例,并非真实的资源
success: (res) => {
console.log('下载成功',res);
if (res.statusCode === 200) {
console.log('下载成功');
}
},
fail: (err) => {
console.log('下载失败',err)
}
}); */
}
}
}
</script>
<style lang="scss" scoped>
.updateVersion{
padding-top: 157rpx;
.bg{
position: relative;
width: 622rpx;
height: 424rpx;
border-radius: 30rpx;
background-color: #fff;
.updateTitle{
height: 112rpx;
}
.updateContent{
height: 192rpx;
padding: 0 48rpx;
}
.bottomBtnWrap{
height: 120rpx;
flex-direction: row;
justify-content: center;
align-items: center;
.bottomBtn{
width: 526rpx;
height: 72rpx;
opacity: 1;
background-color: #82c7c2;
border-radius: 36rpx;
}
}
}
.closeBtn{
width: 622rpx;
height: 120rpx;
flex-direction: row;
align-items: flex-end;
justify-content: center;
}
}
</style>
... ...
... ... @@ -31,18 +31,15 @@
}
if(e.navTitle == '详情'){
this.$request('/banner/getBannerInfo',{banner_id:e.id}).then((res)=>{
console.log('banner详情',res)
this.about_text = res.data
})
}else{
if(e.noticeId != undefined){
this.$request('/system_notice/info',{system_notice_id:e.noticeId}).then((res)=>{
console.log('系统通知详情',res)
this.about_text = res.data.content
})
}else{
this.$request('/common/getConfig',{type:type}).then((res)=>{
console.log('获取配置',res)
if(e.navTitle == '关于我们'){
this.about_text = res.data.about_text
}
... ...
... ... @@ -76,7 +76,7 @@
this.$request('/user/resetpaypwd',this.resetPwdParam).then((res)=>{
console.log('重置支付密码',res)
if(res.code == 1){
uni.reLaunch({
uni.navigateTo({
url:'myWallet'
})
setTimeout(()=>{
... ... @@ -112,7 +112,7 @@
this.$request(url,this.param).then((res)=>{
console.log(retMsg,res)
if(res.code == 1){
uni.reLaunch({
uni.navigateTo({
url:'myWallet'
})
setTimeout(()=>{
... ...
... ... @@ -293,6 +293,7 @@
this.current_page = res.data.current_page
this.last_page = res.data.last_page
this.list = this.list.concat(res.data.data)
console.log('我赞过的帖子',this.list)
this.showList = true
})
}else if(this.otherTabIndex == 2){
... ... @@ -300,6 +301,7 @@
this.current_page = res.data.current_page
this.last_page = res.data.last_page
this.list = this.list.concat(res.data.data)
console.log('我收藏的帖子',this.list)
this.showList = true
})
}
... ... @@ -366,7 +368,6 @@
this.$request('/user/logout').then((res)=>{
if(res.code == 1){
/* =================================== 腾讯云即时通讯退出 开始 ==================================== */
console.log('1111111111111111111',this.isLogin,this.isSDKReady)
if(this.isLogin && this.isSDKReady){
let promise = this.tim.logout();
promise.then(res=> {
... ... @@ -379,7 +380,7 @@
/* =================================== 腾讯云即时通讯退出 开始 ==================================== */
this.$store.commit('logout')
uni.reLaunch({
uni.navigateTo({
url:'/pages/index/login'
})
}else{
... ...
... ... @@ -42,6 +42,8 @@
return{
followList:[],
listType:'',
last_page:0,
current_page:1,
param:{
keyword:'',
page:1,
... ... @@ -52,6 +54,17 @@
computed:{
...mapState(["userinfo"])
},
onReachBottom(){
if(this.current_page == this.last_page){
uni.showToast({
title:'无更多数据',
icon:'none'
})
}else{
this.param.page++
this.getData()
}
},
onReady() {
let navTitle
if(this.listType == 'lis'){
... ... @@ -64,6 +77,10 @@
})
},
onShow(){
this.param.page = 1
this.last_page = 0
this.current_page = 1
this.list = []
this.getData()
},
onLoad(option) {
... ... @@ -96,7 +113,9 @@
res.data.data[i].user.starList = starList
}
}
this.followList = res.data.data
this.last_page = res.data.last_page
this.current_page = res.data.current_page
this.followList = this.followList.concat(res.data.data)
})
},
//去主页
... ...