ios真机调试

This commit is contained in:
zy
2024-03-29 09:46:05 +08:00
parent db360cbefb
commit 17039a7ee6
23 changed files with 107 additions and 53 deletions

View File

@@ -20,11 +20,11 @@
"type" : "uniCloud" "type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-ios" "type" : "uni-app:app-ios"
}, },
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@@ -206,14 +206,21 @@
// 拖动进度条 // 拖动进度条
sliderChange(data) { sliderChange(data) {
// console.log(data,'拖动进度条',data)
if(this.$bgm._options.src == ''){ if(this.$bgm._options.src == ''){
this.$music.playBgm({mute:false}) this.$music.playBgm({mute:false})
// this.$bgm.pause() // this.$bgm.pause()
}else{ }else{
this.$bgm.play() this.$bgm.play()
} }
console.log('拖动') console.log('拖动',data.detail.value)
this.$bgm.seek(data.detail.value) //获取秒数 uni.getBackgroundAudioManager().seek(data.detail.value)
// this.$bgm.seek(data.detail.value) //获取秒数
}, },

View File

@@ -39,7 +39,7 @@
<!-- 暂时去掉关闭按钮 --> <!-- 暂时去掉关闭按钮 -->
<!-- <u-icon name="close" color="#61e781" size="20" style="background-color: #fff;border-radius: 100%;" v-if="!showBig" @click="closePlayer"></u-icon> --> <u-icon name="close" color="#61e781" size="20" style="background-color: #fff;border-radius: 100%;" v-if="!showBig" @click="closePlayer"></u-icon>
<!-- 暂时去掉关闭按钮 --> <!-- 暂时去掉关闭按钮 -->
@@ -79,8 +79,11 @@
}; };
}, },
onLoad() { onLoad() {
this.$music.playBgm({mute:false})
this.$music.playBgm({mute:false})
 
               
}, },
created() { created() {
// this.fengImg = this.$music.getCoverImg() // this.fengImg = this.$music.getCoverImg()

View File

@@ -27,9 +27,10 @@ Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.nuttyr
uni.getSystemInfo({ uni.getSystemInfo({
success: function (res) { success: function (res) {
Vue.prototype.iosHidden = true; Vue.prototype.iosHidden = true;
if (res.platform == 'ios') { if (res.platform == 'ios') {
// Vue.prototype.iosHide = false;
Vue.prototype.iosHidden = false;//ios临时隐藏听书 Vue.prototype.iosHidden = false;//ios临时隐藏听书
Vue.prototype.iosHide = true; Vue.prototype.iosHide = true;

View File

@@ -35,6 +35,7 @@
</view> </view>
<view class="mainContent"> <view class="mainContent">
<view v-if="shupingList.length > 0"> <view v-if="shupingList.length > 0">
<view class="flexbox shuping-topbar"> <view class="flexbox shuping-topbar">
<view class="shuping-topbar-tiao">{{shupingNum || 0}}条书评</view> <view class="shuping-topbar-tiao">{{shupingNum || 0}}条书评</view>
@@ -49,13 +50,17 @@
</view> </view>
</view> </view>
<view class="item" @click.stop="toDetail(item)" v-for="(item,index1) in shupingList" :key="index1"> <view class="item" @click.stop="toDetail(item)" v-for="(item,index1) in shupingList" :key="index1">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<image class="feng" v-if="item.image" :src="item.image" mode="aspectFill"></image> <image class="feng" v-if="item.image" :src="item.image" mode="aspectFill"></image>
<view class="description" v-html="item.content"> <view class="description descriptionNew" v-html="item.content">
</view> </view>
<!-- <image class="feng" v-if="item.image == ''" src="../../static/icon/home_bg.jpg" mode="aspectFill"></image> --> <!-- <image class="feng" v-if="item.image == ''" src="../../static/icon/home_bg.jpg" mode="aspectFill"></image> -->
<view class="btns flexbox" style="margin-top:10rpx;"> <view class="btns flexbox" style="margin-top:10rpx;">
<span class="left" style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span> <span class="left" style="color: #C0C4CC;">{{formatTimeDifferenceFromT(item.createTime)}}</span>
<span class="right flexbox opbtns"> <span class="right flexbox opbtns">
<image class="gzicon" v-if="item.ilike" src="../../static/icon/gz2.png" mode="aspectFill" <image class="gzicon" v-if="item.ilike" src="../../static/icon/gz2.png" mode="aspectFill"
@@ -190,6 +195,7 @@
status: 3, status: 3,
shupingList: [], shupingList: [],
bfaid: null, bfaid: null,
newTime:'',
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
@@ -284,9 +290,13 @@
}) })
}, },
formatTimeDifferenceFromT(dateTimeT) { formatTimeDifferenceFromT(dateTimeT) {
dateTimeT= dateTimeT.replace(/-/g,"/")
console.log("🚀 ~ formatTimeDifferenceFromT ~ dateTimeT:", dateTimeT)
const now = new Date(); const now = new Date();
const t = new Date(dateTimeT); const t = new Date(dateTimeT);
console.log("🚀 ~ formatTimeDifferenceFromT ~ t:", t)
const differenceInSeconds = Math.floor((now - t) / 1000); const differenceInSeconds = Math.floor((now - t) / 1000);
console.log("🚀 ~ formatTimeDifferenceFromT ~ differenceInSeconds:", differenceInSeconds)
if (differenceInSeconds <= 3600) { if (differenceInSeconds <= 3600) {
const minutes = Math.floor(differenceInSeconds / 60); const minutes = Math.floor(differenceInSeconds / 60);
@@ -710,6 +720,7 @@
-webkit-line-clamp: 9; -webkit-line-clamp: 9;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
// view{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px); // view{ padding-left: 30rpx; box-sizing: border-box; width: calc(100% - 150px);
@@ -753,18 +764,24 @@
} }
.description { .description {
overflow: hidden; // width: 100%;
color: #666;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5;
line-clamp: 5;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
font-size: 26rpx; overflow: hidden !important;
margin-bottom: 20rpx; height:190rpx;
margin-top: 10rpx; color: #666 !important;
text-overflow: -o-ellipsis-lastline !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
display: -webkit-box !important;
-webkit-line-clamp: 5 !important;
line-clamp: 5 !important;
-webkit-box-orient: vertical !important;
font-size: 26rpx !important;
margin-bottom: 20rpx !important;
margin-top: 10rpx !important;
white-space: pre-wrap;
// height: 172rpx; // height: 172rpx;
} }
@@ -816,4 +833,7 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
overflow: hidden; overflow: hidden;
} }
.descriptionNew{
// overflow: auto;
}
</style> </style>

View File

@@ -5,13 +5,16 @@
<z-nav-bar title="方药检索"></z-nav-bar> <z-nav-bar title="方药检索"></z-nav-bar>
<view class="contentBox"> <view class="contentBox">
<view class="oneCateList flexbox firstTab"> <view class="oneCateList flexbox firstTab">
<text :class="[curFirstTabIndex == index ? 'cur' : '']" @click="setFirstTabIndex(item,index)" <text :class="[curFirstTabIndex == index ? 'cur' : '']" @click="setFirstTabIndex(item,index)"
v-for="(item, index) in firstTabList" :key="item.firstTabId">{{item.title}}</text> v-for="(item, index) in firstTabList" :key="item.firstTabId">{{item.title}}</text>
</view> </view>
<view v-if="curFirstTabIndex==0"> <view v-if="curFirstTabIndex==0">
<view class="oneCateBot flexbox"> <view class="oneCateBot flexbox">
<!-- &&index!=0 -->
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)" <text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId" v-show="!iosHide&&index!=0">{{item.title}}</text> v-for="(item, index) in oneCateList" :key="item.prescriptCategoryId" v-show="iosHide">{{item.title}}</text>
</view> </view>
<view class="search_box" v-if="oneCateList.length > 0"> <view class="search_box" v-if="oneCateList.length > 0">
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" <u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear"
@@ -27,7 +30,8 @@
<u-divider text="未找到相关方剂哦~"></u-divider> <u-divider text="未找到相关方剂哦~"></u-divider>
</view> </view>
</view> </view>
<view v-show="!showSearchList&&!iosHide&&curOneCateIndex!=0"> <!-- &&curOneCateIndex!=0 -->
<view v-show="!showSearchList&&iosHide">
<view class="grid twoCateList" v-if="twoCateList.length > 0"> <view class="grid twoCateList" v-if="twoCateList.length > 0">
<u-grid :col="3" border class="u-grid-list"> <u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId" <u-grid-item v-for="(item, index) in twoCateList" :key="item.prescriptCategoryId"

View File

@@ -223,6 +223,8 @@
email: '', email: '',
phoneEmail: '', phoneEmail: '',
password: '', password: '',
phoneEmail: '2227572976@qq.com',
password: 'zm123456',
//验证码 //验证码
codeText: '获取验证码', codeText: '获取验证码',
//验证码已发 //验证码已发
@@ -251,6 +253,7 @@
}, },
//第一次加载 //第一次加载
onLoad(e) { onLoad(e) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.isIos = (plus.os.name == "iOS"); this.isIos = (plus.os.name == "iOS");
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
@@ -263,6 +266,7 @@
}, },
//页面显示 //页面显示
onShow() { onShow() {
this.closeMusic()
this.getCountyCode() this.getCountyCode()
this.getSettlement() this.getSettlement()
}, },
@@ -270,6 +274,16 @@
methods: { methods: {
...mapMutations(['setUserInfo']), ...mapMutations(['setUserInfo']),
...mapMutations(['setHealthMes']), ...mapMutations(['setHealthMes']),
closeMusic(){
this.$music.setCloseBgm()    // 关闭音频
uni.setStorage({
                    key: 'playVisible',
                    data: false,
                    success: function () {
                        console.log('success');
                    }
                }); this.setUserInfo({'playVisible':false})
},
// 获取国家区域编码 // 获取国家区域编码
getCountyCode() { getCountyCode() {
$http.request({ $http.request({
@@ -523,6 +537,10 @@
title: '登录成功', title: '登录成功',
duration: 1000, duration: 1000,
}); });
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.switchTab({
url: '/pages/peanut/home' url: '/pages/peanut/home'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9788EB5","name":"疯子读书","version":{"name":"1.2.40","code":1240},"description":"疯子读书","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"OAuth":{},"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"compatible":{"ignoreVersion":true},"privacy":{"prompt":"template","template":{"title":"用户协议和隐私政策","message":"请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。","buttonAccept":"同意","buttonRefuse":"暂不同意"}},"compilerVersion":3,"nativePlugins":{},"uniStatistics":{"version":"2","enable":true,"uniCloud":{"provider":"aliyun","spaceId":"mp-3614b80b-2d75-4462-a481-4998f8187274","clientSecret":"ogncD4XunyyFxHlbDFZ/Ww=="}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#ffffff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.98","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"fast"},"tabBar":{"color":"#444444","selectedColor":"#079307","borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#ffffff","list":[{"pagePath":"pages/peanut/home","iconPath":"static/tab/icon1_n.png","selectedIconPath":"static/tab/icon1_y.png","text":"首页"},{"pagePath":"pages/library/library","iconPath":"static/tab/icon3_n.png","selectedIconPath":"static/tab/icon3_y.png","text":"我的图书"},{"pagePath":"pages/medicaldes/medicaldes","iconPath":"static/icon/five5.png","selectedIconPath":"static/icon/five5.png","text":"吴门医述"},{"pagePath":"pages/peanut/mine","iconPath":"static/tab/icon4_n.png","selectedIconPath":"static/tab/icon4_y.png","text":"我"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}} {"@platforms":["android","iPhone","iPad"],"id":"__UNI__9788EB5","name":"疯子读书","version":{"name":"1.2.43","code":1243},"description":"疯子读书","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Payment":{},"OAuth":{},"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":false,"waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#FFFFFF"},"compatible":{"ignoreVersion":true},"privacy":{"prompt":"template","template":{"title":"用户协议和隐私政策","message":"请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='https://main.nuttyreading.com/agreement.html'>《用户协议》</a>和<a href='https://main.nuttyreading.com/privacy.html'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。","buttonAccept":"同意","buttonRefuse":"暂不同意"}},"compilerVersion":3,"nativePlugins":{},"uniStatistics":{"version":"2","enable":true,"uniCloud":{"provider":"aliyun","spaceId":"mp-3614b80b-2d75-4462-a481-4998f8187274","clientSecret":"ogncD4XunyyFxHlbDFZ/Ww==","endpoint":"https://api.next.bspapp.com"}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#ffffff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.06","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"fast"},"tabBar":{"color":"#444444","selectedColor":"#079307","borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#ffffff","list":[{"pagePath":"pages/peanut/home","iconPath":"static/tab/icon1_n.png","selectedIconPath":"static/tab/icon1_y.png","text":"首页"},{"pagePath":"pages/medicaldes/medicaldes","iconPath":"static/icon/five5_n.png","selectedIconPath":"static/icon/five5.png","text":"吴门医述"},{"pagePath":"pages/library/library","iconPath":"static/tab/icon3_n.png","selectedIconPath":"static/tab/icon3_y.png","text":"我的图书"},{"pagePath":"pages/peanut/mine","iconPath":"static/tab/icon4_n.png","selectedIconPath":"static/tab/icon4_y.png","text":"我"}],"height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -461,8 +461,9 @@ var music = {
console.log('存在定时器,清空') console.log('存在定时器,清空')
clearInterval(bgm.interval) clearInterval(bgm.interval)
bgm.interval = null bgm.interval = null
bgm.stop()
} }
bgm.stop()
} }
} }