diff --git a/manifest.json b/manifest.json index f7d735b..2d99cf2 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,11 @@ "SQLite" : {}, "Barcode" : {}, "Camera" : {}, - "Share" : {} + "Share" : {}, + "Contacts" : {}, + "Geolocation" : {}, + "Maps" : {}, + "Messaging" : {} }, /* 应用发布信息 */ "distribute" : { @@ -30,22 +34,28 @@ "permissions" : [ "", "", + "", + "", "", "", + "", "", "", "", - "", - "", "", "", "", + "", "", "", + "", "", + "", "", "", + "", "", + "", "" ], "minSdkVersion" : 21, @@ -59,7 +69,13 @@ "sdkConfigs" : { "ad" : {}, "share" : {}, - "statics" : {} + "statics" : {}, + "geolocation" : { + "system" : { + "__platform__" : [ "android" ] + } + }, + "maps" : {} } }, "nativePlugins" : { diff --git a/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar b/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar index 5391e28..48f5158 100644 Binary files a/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar and b/nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar differ diff --git a/pages.json b/pages.json index 1d19998..a15b766 100644 --- a/pages.json +++ b/pages.json @@ -17,6 +17,13 @@ "enablePullDownRefresh": false } }, + { + "path": "pages/feedback/Feedback", + "style": { + "navigationBarTitleText": "Feedback", + "enablePullDownRefresh": false + } + }, // { // "path": "pages/create/Create", // "style": { @@ -45,13 +52,13 @@ "enablePullDownRefresh": false } }, - { - "path": "pages/scan/Book", - "style": { - "navigationBarTitleText": "Book", - "enablePullDownRefresh": false - } - }, + // { + // "path": "pages/scan/Book", + // "style": { + // "navigationBarTitleText": "Book", + // "enablePullDownRefresh": false + // } + // }, { "path": "pages/scan/Calendar", "style": { diff --git a/pages/feedback/Feedback.vue b/pages/feedback/Feedback.vue new file mode 100644 index 0000000..6d75ec4 --- /dev/null +++ b/pages/feedback/Feedback.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/pages/history/History.vue b/pages/history/History.vue index b9effe5..833fc4c 100644 --- a/pages/history/History.vue +++ b/pages/history/History.vue @@ -1,27 +1,27 @@ @@ -45,6 +60,11 @@ barcodeInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -67,13 +87,59 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: 'pages/feedback/Feedback' + }); + }, + //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.barcodeInfo.message, success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -213,7 +279,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ diff --git a/pages/scan/Book.vue b/pages/scan/Book.vue index 19560f5..e3353b5 100644 --- a/pages/scan/Book.vue +++ b/pages/scan/Book.vue @@ -1,4 +1,4 @@ - @@ -50,6 +64,11 @@ calendarInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -72,8 +91,55 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //添加活动 addEvent(){ @@ -82,8 +148,7 @@ //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.calendarInfo, success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -102,12 +167,12 @@ //copy结果值 copyValue(){ let that = this; - //console.log('点击复制关键词事件') + //console.log('点击复制关键词事件',that.calendarInfo) uni.setClipboardData({ - data: that.calendarInfo, + data: JSON.stringify(that.calendarInfo), success() { uni.showToast({ - title: 'copy success!' + title: 'copy success!', }); } }) @@ -193,8 +258,10 @@ Sponsor: data.Sponsor, Theme: data.Theme, Condition: data.Condition, - closeTime: data.closeTime, - startTime: data.startTime, + closeTime: data.closeTime.Year +'-'+ data.closeTime.Month +'-'+ data.closeTime.Day + +' '+ data.closeTime.Hours +':'+ data.closeTime.Minutes +':'+ data.closeTime.Seconds, + startTime: data.startTime.Year +'-'+ data.startTime.Month +'-'+ data.startTime.Day + +' '+ data.startTime.Hours +':'+ data.startTime.Minutes +':'+ data.startTime.Seconds, imgUrl: data.imgUrl } that.calendarInfo = insertData; @@ -221,7 +288,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -236,8 +303,8 @@ margin-top: 120rpx; background-color: #141b29; color: #fff; - //border: 2px solid yellow; - height: 240rpx; + //border: 2px solid green; + height: 260rpx; text-align: start; } @@ -257,8 +324,6 @@ color: #8f8f94; height: 120rpx; text-align: center; - // margin-left: 20rpx; - // margin-right: 20rpx; .toolText{ diff --git a/pages/scan/Contacts.vue b/pages/scan/Contacts.vue index dc7cf22..f7d38f9 100644 --- a/pages/scan/Contacts.vue +++ b/pages/scan/Contacts.vue @@ -3,12 +3,12 @@ - Name: {{ contactsInfo.peopleName.FullName }} - Tel: {{ contactsInfo.phones[0].number }} - E-mail: {{ contactsInfo.emails[0].address }} - Address: {{ contactsInfo.addresses[0].addressLines[0] }} - Note: {{ contactsInfo.Title }} - Org: {{ contactsInfo.Company }} + Name: {{ contactsInfo.peopleName }} + Tel: {{ contactsInfo.telPhoneNumber }} + E-mail: {{ contactsInfo.email }} + Address: {{ contactsInfo.address }} + Note: {{ contactsInfo.title }} + Org: {{ contactsInfo.company }} @@ -24,7 +24,7 @@ Send email - + Call @@ -42,7 +42,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -55,6 +70,11 @@ contactsInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -77,21 +97,97 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + console.log('jump') + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //添加联系人 addContact(){ - + let that = this; + uni.addPhoneContact({ + firstName: that.contactsInfo.peopleName, + mobilePhoneNumber: that.contactsInfo.telPhoneNumber, + email: that.contactsInfo.email, + organization: that.contactsInfo.company, + title: that.contactsInfo.title, + success: function () { + that.$refs.toast.show({ + title: 'Success', + content: 'add success!', + icon: 'success', + duration: 3000 + }) + }, + fail: function () { + that.$refs.toast.show({ + title: 'Fail', + content: 'added fail,please try it again!', + icon: 'fail', + duration: 3000 + }) + } + }); }, //发送email sendEmail(){ - + var msg = plus.messaging.createMessage(plus.messaging.TYPE_EMAIL); + msg.to = [this.contactsInfo.email]; + msg.body = JSON.stringify(this.contactsInfo); + plus.messaging.sendMessage( msg ); }, //打电话 call(){ - + uni.makePhoneCall({ + phoneNumber: this.contactsInfo.telPhoneNumber //仅为示例 + }); }, //copy结果值 @@ -99,7 +195,7 @@ let that = this; //console.log('点击复制关键词事件') uni.setClipboardData({ - data: that.contactsInfo, + data: JSON.stringify(that.contactsInfo), success() { uni.showToast({ title: 'copy success!' @@ -179,12 +275,21 @@ //加载数据 async initData(option){ console.log('initoption',option) + let that = this; let data = JSON.parse(option); + console.log('data1',data) + console.log('contactsInfo.TelPhoneNumbers[0]',data.TelPhoneNumbers[0].TelPhoneNumber) + console.log('contactsInfo.EmailContents[1].AddressInfo',data.EmailContents[0].AddressInfo) + console.log('contactsInfo.AddressesInfos[0]',data.AddressesInfos[0]) let insertData = { - Company : data.Company, - ContactLinks: data.ContactLinks, - peopleName: data.peopleName, + title: data.Title, + company : data.Company, + contactLinks: data.ContactLinks, + peopleName: data.peopleName.FullName, + telPhoneNumber: data.TelPhoneNumbers[0].TelPhoneNumber, + email: data.EmailContents[0].AddressInfo, + address: data.AddressesInfos[0], imgUrl: data.imgUrl } that.contactsInfo = insertData; diff --git a/pages/scan/Email.vue b/pages/scan/Email.vue index b42ca14..6a7309c 100644 --- a/pages/scan/Email.vue +++ b/pages/scan/Email.vue @@ -39,7 +39,22 @@ - Feedback or Suggestion + Feedback or Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -52,6 +67,11 @@ emailInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -74,23 +94,92 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //发送邮件 sendEmail(){ - + var msg = plus.messaging.createMessage(plus.messaging.TYPE_EMAIL); + msg.to = [this.emailInfo.addressInfo]; + msg.body = JSON.stringify(this.emailInfo); + plus.messaging.sendMessage( msg ); }, //添加联系人 addContact(){ - + let that = this; + uni.addPhoneContact({ + firstName: 'email user', + email: that.emailInfo.addressInfo, + success: function () { + that.$refs.toast.show({ + title: 'Success', + content: 'add success!', + icon: 'success', + duration: 3000 + }) + }, + fail: function () { + that.$refs.toast.show({ + title: 'Fail', + content: 'added fail,please try it again!', + icon: 'fail', + duration: 3000 + }) + } + }); }, //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.emailInfo.addressInfo, success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -111,7 +200,7 @@ let that = this; //console.log('点击复制关键词事件') uni.setClipboardData({ - data: that.emailInfo, + data: JSON.stringify(that.emailInfo), success() { uni.showToast({ title: 'copy success!' @@ -124,10 +213,6 @@ async openSqlite(){ try{ let b = await openSqlite() - // uni.showToast({ - // title:"open db success", - // icon:"none" - // }) console.log('db打开了'); }catch(e){ console.error("open db error",e) @@ -234,7 +319,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ diff --git a/pages/scan/Location.vue b/pages/scan/Location.vue index 45a8528..2b0fe3a 100644 --- a/pages/scan/Location.vue +++ b/pages/scan/Location.vue @@ -38,7 +38,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -51,6 +66,11 @@ locationInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -73,8 +93,55 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //打开地图 showMap(){ @@ -220,7 +287,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ diff --git a/pages/scan/Product.vue b/pages/scan/Product.vue index 7b57c08..7657ec2 100644 --- a/pages/scan/Product.vue +++ b/pages/scan/Product.vue @@ -37,7 +37,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -50,6 +65,11 @@ productInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -72,8 +92,55 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //跳转亚马逊 openShoping(){ let that = this; @@ -87,8 +154,7 @@ //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.productInfo.message , success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -228,7 +294,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ diff --git a/pages/scan/Scan.nvue b/pages/scan/Scan.nvue index 5927eb3..f7c888a 100644 --- a/pages/scan/Scan.nvue +++ b/pages/scan/Scan.nvue @@ -21,19 +21,6 @@ - 跳转Barcode页面 - 跳转Book页面 - 跳转Calendar页面 - 跳转Contacts页面 - 跳转Email页面 - 跳转Location页面 - 跳转Paypal页面 - 跳转Product页面 - 跳转Sms页面 - 跳转Tel页面 - 跳转Text页面 - 跳转Url页面 - 跳转Wifi页面 @@ -121,9 +108,11 @@ that.jumpToPage('/pages/scan/Contacts','scan',JSON.stringify(result)) }else if(type === 'email'){ that.jumpToPage('/pages/scan/Email','scan',JSON.stringify(result)) - }else if(type === 3){ - that.jumpToPage('/pages/scan/Book','scan',JSON.stringify(result)) - }else if(type === 'tel_phone'){ + } + // else if(type === 3){ + // that.jumpToPage('/pages/scan/Book','scan',JSON.stringify(result)) + // } + else if(type === 'tel_phone'){ that.jumpToPage('/pages/scan/Tel','scan',JSON.stringify(result)) }else if(type === 'article'){ that.jumpToPage('/pages/scan/Product','scan',JSON.stringify(result)) @@ -174,10 +163,6 @@ async openSqlite(){ try{ let b = await openSqlite() - // uni.showToast({ - // title:"open db success", - // icon:"none" - // }) console.log('db打开了'); }catch(e){ console.error("open db error",e) @@ -276,7 +261,9 @@ .bg{ width: 750rpx; flex: 1; + /* #ifndef APP-PLUS-NVUE */ background-color: #00ffffff; + /* #endif */ position: relative; display: flex; align-items: center; @@ -321,7 +308,7 @@ width: 100rpx; height: 100rpx; margin-top: 200rpx; - background-color: #707070; + background-color: #000000; border-radius: 100%; } diff --git a/pages/scan/Sms.vue b/pages/scan/Sms.vue index 23d1c8f..6cdcb12 100644 --- a/pages/scan/Sms.vue +++ b/pages/scan/Sms.vue @@ -9,10 +9,20 @@ - - + + - Web Search + Send SMS + + + + + Share + + + + + Copy @@ -23,7 +33,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -32,32 +57,15 @@ export default { data() { return { - col: 4, + col: 3, smsInfo:{}, tableName: 'scan_code', textImgUrl: '', - fastToolList:[ - { - "index": 0, - "text":"Send SMS", - "icon": "tn-icon-email" - }, - { - "index": 1, - "text":"Send MMS", - "icon": "tn-icon-my-circle-fill" - }, - { - "index": 2, - "text":"Copy", - "icon": "tn-icon-copy-fill" - }, - { - "index": 3, - "text":"Share", - "icon": "tn-icon-share-triangle" - } - ] + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -81,6 +89,79 @@ that.closedb(); }, methods: { + + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //发送短信 + sendMessage(){ + var msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS); + msg.to = []; + msg.body = JSON.stringify(this.smsInfo); + plus.messaging.sendMessage( msg ); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + + //分享 + share(){ + uni.shareWithSystem({ + summary: this.smsInfo, + success(){ + // 分享完成,请注意此时不一定是成功分享 + uni.showToast({ + title: 'share success!' + }); + }, + fail(){ + // 分享失败 + uni.showToast({ + title: 'share fail!' + }); + } + }) + }, + + //复制url结果 + copyValue(){ + let that = this; + //console.log('点击复制关键词事件') + uni.setClipboardData({ + data: JSON.stringify(that.smsInfo), + success() { + uni.showToast({ + title: 'copy success!' + }); + } + }) + }, + // 打开数据库 async openSqlite(){ try{ @@ -182,7 +263,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -217,8 +298,7 @@ color: #8f8f94; height: 120rpx; text-align: center; - margin-left: 20rpx; - margin-right: 20rpx; + .toolText{ diff --git a/pages/scan/Tel.vue b/pages/scan/Tel.vue index 3e4b66d..bf0633c 100644 --- a/pages/scan/Tel.vue +++ b/pages/scan/Tel.vue @@ -37,7 +37,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -50,6 +65,11 @@ telInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -72,23 +92,92 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //添加联系人 addConnect(){ - + let that = this; + uni.addPhoneContact({ + firstName: 'edit user', + mobilePhoneNumber: that.telInfo.TelPhoneNumber, + success: function () { + that.$refs.toast.show({ + title: 'Success', + content: 'add success!', + icon: 'success', + duration: 3000 + }) + }, + fail: function () { + that.$refs.toast.show({ + title: 'Fail', + content: 'added fail,please try it again!', + icon: 'fail', + duration: 3000 + }) + } + }); }, //打电话 call(){ - + uni.makePhoneCall({ + phoneNumber: this.telInfo.TelPhoneNumber //仅为示例 + }); }, //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.telInfo.TelPhoneNumber, success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -109,7 +198,7 @@ let that = this; //console.log('点击复制关键词事件') uni.setClipboardData({ - data: telInfo.TelPhoneNumber, + data: that.telInfo.TelPhoneNumber, success() { uni.showToast({ title: 'copy success!' @@ -218,7 +307,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -253,8 +342,6 @@ color: #8f8f94; height: 120rpx; text-align: center; - margin-left: 20rpx; - margin-right: 20rpx; .toolText{ diff --git a/pages/scan/Text.vue b/pages/scan/Text.vue index d19f56b..8b2bbe4 100644 --- a/pages/scan/Text.vue +++ b/pages/scan/Text.vue @@ -32,7 +32,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -41,10 +56,15 @@ export default { data() { return { - col: 4, + col: 3, textInfo:{}, tableName: 'scan_code', textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -67,12 +87,60 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + + }, methods: { + + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.textInfo.message, success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -91,7 +159,7 @@ //打开内部浏览器 openWeb(){ let that = this; - console.log('that.textInfo.message',that.textInfo.message) + //console.log('that.textInfo.message',that.textInfo.message) uni.navigateTo({ url: '/pages/webview/webview?url=https://www.baidu.com/s?wd=' + that.textInfo.message //url: '/pages/webview/webview?url=http://www.google.com?wd=' + that.textInfo.message @@ -213,7 +281,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -249,8 +317,6 @@ color: #8f8f94; height: 120rpx; text-align: center; - margin-left: 20rpx; - margin-right: 20rpx; .toolText{ diff --git a/pages/scan/Url.vue b/pages/scan/Url.vue index eef6783..b5a044a 100644 --- a/pages/scan/Url.vue +++ b/pages/scan/Url.vue @@ -32,7 +32,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -45,23 +60,11 @@ urlInfo:{}, tableName: 'scan_code', textImgUrl: '', - fastToolList:[ - { - "index": 0, - "text":"Open", - "icon": "tn-icon-plane" - }, - { - "index": 1, - "text":"Copy", - "icon": "tn-icon-copy-fill" - }, - { - "index": 2, - "text":"Share", - "icon": "tn-icon-share-triangle" - } - ] + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -82,22 +85,69 @@ onHide() { let that = this; that.closedb(); + + }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //打开url openUrl(){ let that = this; uni.navigateTo({ - url: '/pages/webview/webview?url=' + that.urlInfo.LinkValue + url: '/pages/webview/webview?url=' + that.urlInfo.LinkValue }); }, //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: this.urlInfo.LinkValue , success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -227,7 +277,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -262,8 +312,6 @@ color: #8f8f94; height: 120rpx; text-align: center; - margin-left: 20rpx; - margin-right: 20rpx; .toolText{ font-size: 24rpx; @@ -320,5 +368,9 @@ border: 1px solid #8f8f94; } + .starTipText{ + color: #fff; + font-size: 48rpx; + } } diff --git a/pages/scan/Wifi.vue b/pages/scan/Wifi.vue index 6cd0d81..1f4ec94 100644 --- a/pages/scan/Wifi.vue +++ b/pages/scan/Wifi.vue @@ -33,7 +33,22 @@ - Feedback or Suggestion + Feedback & Suggestion + + + + + Do you like this app? + + + + + + submit + + + + @@ -42,10 +57,15 @@ export default { data() { return { - col: 4, + col: 3, wifiInfo:{}, tableName: 'scan_code', - textImgUrl: '' + textImgUrl: '', + + starRateValue: 5, //评分星星数量 + showStarTip: false, //评分展示开关 + startTipColor: '#706F6F', //评分弹窗背景色 + startTipFontColor: '#fff' //评分文字色 } }, async onLoad(option) { @@ -68,14 +88,63 @@ let that = this; that.closedb(); }, + onShow() { + //uni.clearStorageSync(); + }, + onBackPress(e){ + let that = this; + //判断评分弹窗条件是否达到要求 + let starTipStatus = that.getStarTipStatus(); + console.log('starTipStatus',starTipStatus) + if(starTipStatus === null || starTipStatus === ""){ + //达到要求 + that.showStarTip = true; + return true; + }else{ + return false; + } + + }, methods: { + //获取弹窗状态结果 + getStarTipStatus(){ + return uni.getStorageSync('starTipStatus'); + }, + + //设置弹窗状态结果 + setStarTipStatus(value){ + uni.setStorageSync('starTipStatus', value); + }, + + //提交反馈 + starTipSubmit(){ + let that = this; + that.$refs.toast.show({ + title: 'Success', + content: 'Thanks for feedback!', + icon: 'success', + duration: 3000 + }) + that.showStarTip = false; + //更改starTipStatus状态 + that.setStarTipStatus(false); + }, + + //跳转到反馈页面 + jumpToFeedback(){ + uni.navigateTo({ + url: '/pages/feedback/Feedback' + }); + }, + //连接wifi connectWifi(){ let that = this; uni.connectWifi({ SSID: that.wifiInfo.ssidNumber, password: that.wifiInfo.password, + maunal: true, //maunal: false//跳转到系统设置页进行连接,android 10以上仅支持 maunal 手动 success() { uni.showToast({ @@ -93,8 +162,7 @@ //分享 share(){ uni.shareWithSystem({ - summary: '', - href: 'https://uniapp.dcloud.io', + summary: JSON.stringify(this.wifiInfo), success(){ // 分享完成,请注意此时不一定是成功分享 uni.showToast({ @@ -227,7 +295,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh; .listView{ @@ -262,9 +330,6 @@ color: #8f8f94; height: 120rpx; text-align: center; - margin-left: 20rpx; - margin-right: 20rpx; - .toolText{ font-size: 24rpx; diff --git a/pages/setting/Setting.vue b/pages/setting/Setting.vue index 4d1c9ad..484cd8d 100644 --- a/pages/setting/Setting.vue +++ b/pages/setting/Setting.vue @@ -248,7 +248,7 @@ flex-direction: column; align-items: center; justify-content: center; - background-color: #000000; + background-color: #1F222B; height:100vh;