Browse Source

完善功能

master
chengkun 2 years ago
parent
commit
3c0bc14249
  1. 24
      manifest.json
  2. BIN
      nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar
  3. 21
      pages.json
  4. 118
      pages/feedback/Feedback.vue
  5. 18
      pages/history/History.vue
  6. 74
      pages/scan/Barcode.vue
  7. 14
      pages/scan/Book.vue
  8. 95
      pages/scan/Calendar.vue
  9. 135
      pages/scan/Contacts.vue
  10. 107
      pages/scan/Email.vue
  11. 71
      pages/scan/Location.vue
  12. 74
      pages/scan/Product.vue
  13. 29
      pages/scan/Scan.nvue
  14. 140
      pages/scan/Sms.vue
  15. 105
      pages/scan/Tel.vue
  16. 82
      pages/scan/Text.vue
  17. 98
      pages/scan/Url.vue
  18. 83
      pages/scan/Wifi.vue
  19. 2
      pages/setting/Setting.vue

24
manifest.json

@ -21,7 +21,11 @@
"SQLite" : {}, "SQLite" : {},
"Barcode" : {}, "Barcode" : {},
"Camera" : {}, "Camera" : {},
"Share" : {} "Share" : {},
"Contacts" : {},
"Geolocation" : {},
"Maps" : {},
"Messaging" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -30,22 +34,28 @@
"permissions" : [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<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_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>", "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>" "<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
], ],
"minSdkVersion" : 21, "minSdkVersion" : 21,
@ -59,7 +69,13 @@
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {}, "ad" : {},
"share" : {}, "share" : {},
"statics" : {} "statics" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "android" ]
}
},
"maps" : {}
} }
}, },
"nativePlugins" : { "nativePlugins" : {

BIN
nativeplugins/LY-HWScan/android/uniplugin_hwscan-release.aar

Binary file not shown.

21
pages.json

@ -17,6 +17,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/feedback/Feedback",
"style": {
"navigationBarTitleText": "Feedback",
"enablePullDownRefresh": false
}
},
// { // {
// "path": "pages/create/Create", // "path": "pages/create/Create",
// "style": { // "style": {
@ -45,13 +52,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ // {
"path": "pages/scan/Book", // "path": "pages/scan/Book",
"style": { // "style": {
"navigationBarTitleText": "Book", // "navigationBarTitleText": "Book",
"enablePullDownRefresh": false // "enablePullDownRefresh": false
} // }
}, // },
{ {
"path": "pages/scan/Calendar", "path": "pages/scan/Calendar",
"style": { "style": {

118
pages/feedback/Feedback.vue

@ -0,0 +1,118 @@
<template>
<view class="content">
<view class="radioStyle">
<tn-radio-group v-model="radioValue" width="100%" wrap :size="radioGroupSize">
<tn-radio :iconSize="iconSize" :labelSize="labelSize" v-for="(item, index) in radioList" :key="index" :name="item.name" :disabled="item.disabled">
<view class="radioFont">{{ item.name }}</view>
</tn-radio>
</tn-radio-group>
</view>
<view class="radioBtn">
<tn-button @click="submitFeedback()" backgroundColor="#0186ff" width="600rpx" height="100rpx"
:fontSize="btnFontSize">Submit</tn-button>
</view>
<tn-toast ref="toast"></tn-toast>
</view>
</template>
<script>
export default {
data() {
return {
radioGroupSize: 45,
labelSize: 45,
iconSize: 40,
btnFontSize: 36,
radioValue: '',
radioList:[
{
'name': 'Scan faild',
'disabled': false
},
{
'name': 'Too many ads',
'disabled': false
},
{
'name': 'Need more infomation',
'disabled': false
},
{
'name': 'Bugs',
'disabled': false
},
{
'name': 'Other',
'disabled': false
}
]
}
},
onLoad() {
//starTipStatus
this.setStarTipStatus(false);
},
onHide() {
},
methods: {
//
setStarTipStatus(value){
uni.setStorageSync('starTipStatus', value);
},
//
submitFeedback(){
let that = this;
if(that.radioValue == '' || that.radioValue == null){
that.$refs.toast.show({
title: 'Fail',
content: 'please select one!',
icon: 'fail',
duration: 3000
})
}else{
that.$refs.toast.show({
title: 'Success',
content: 'Thanks for feedback!',
icon: 'success',
duration: 3000
})
//
setTimeout(() =>{
uni.navigateBack();
}, 3000);
}
}
}
}
</script>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
background-color: #1F222B;
height:100vh;
}
.radioStyle{
//border: 1px solid red;
margin-top: 50rpx;
margin-left: 50rpx;
padding-top: 100rpx;
}
.radioFont{
color: #fff;
//margin-top: 50rpx;
}
.radioBtn{
//border: 1px solid yellow;
margin-top: 600rpx;
}
</style>

18
pages/history/History.vue

@ -1,27 +1,27 @@
<template> <template>
<view class="content"> <view class="content">
<view class="head"> <!-- <view class="head">
<view class="headLine">Favorites</view> <view class="headLine">Favorites</view>
<tn-list-view :card="cardMode" class="settingList" unlined="all"> <tn-list-view :card="cardMode" class="settingList" unlined="all">
<tn-list-cell class="listItem" v-for="(item, index) in favoritesList" :key="index"> <tn-list-cell class="listItem" v-for="(item, index) in favoritesList" :key="index">
<view class="list-icon-text"> <view class="list-icon-text"> -->
<!-- 左边图标文本显示部分 --> <!-- 左边图标文本显示部分 -->
<view class="list-left"> <!-- <view class="list-left">
<view class="list-left-icon tn-icon-circle-fill tn-color-gray"></view> <view class="list-left-icon tn-icon-circle-fill tn-color-gray"></view>
<view class="list-left-text"> <view class="list-left-text">
<view class="list-left-text-one">{{ item.label }}</view> <view class="list-left-text-one">{{ item.label }}</view>
<view class="list-left-text-two">{{ item.text }}</view> <view class="list-left-text-two">{{ item.text }}</view>
</view> </view>
</view> </view> -->
<!-- 右边操作按钮部分 --> <!-- 右边操作按钮部分 -->
<!-- <view class="list-right"> <!-- <view class="list-right">
<tn-switch v-model="beepChecked" :inactiveValue="0" :activeValue="1" <tn-switch v-model="beepChecked" :inactiveValue="0" :activeValue="1"
:inactiveColor="inactiveColor" :activeColor="activeColor"></tn-switch> :inactiveColor="inactiveColor" :activeColor="activeColor"></tn-switch>
</view> --> </view>
</view> </view>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
</view> </view> -->
<view class="body"> <view class="body">
<view class="headLine">History</view> <view class="headLine">History</view>
<tn-list-view :card="cardMode" class="settingList" unlined="all"> <tn-list-view :card="cardMode" class="settingList" unlined="all">
@ -141,8 +141,8 @@
that.jumpToPage('/pages/scan/Location','history', data); that.jumpToPage('/pages/scan/Location','history', data);
}else if(category === 'Calendar'){ }else if(category === 'Calendar'){
that.jumpToPage('/pages/scan/Calendar','history', data); that.jumpToPage('/pages/scan/Calendar','history', data);
}else if(category === 'Book'){ }else if(category === 'Barcode'){
that.jumpToPage('/pages/scan/Book','history', data); that.jumpToPage('/pages/scan/Barcode','history', data);
} }
}, },
@ -230,7 +230,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
// height:1400rpx; // height:1400rpx;
height: 100vh; height: 100vh;
overflow: scroll; overflow: scroll;

74
pages/scan/Barcode.vue

@ -32,7 +32,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -45,6 +60,11 @@
barcodeInfo:{}, barcodeInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -67,13 +87,59 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.barcodeInfo.message,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -213,7 +279,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{

14
pages/scan/Book.vue

@ -1,4 +1,4 @@
<template> <!-- <template>
<view class="content"> <view class="content">
<tn-avatar class="icon tn-icon-book" size="xl"></tn-avatar> <tn-avatar class="icon tn-icon-book" size="xl"></tn-avatar>
<tn-list-view :card="true" unlined="all" class="listView"> <tn-list-view :card="true" unlined="all" class="listView">
@ -22,7 +22,7 @@
<image src="/static/logo.png" class="buttomImg"/> <image src="/static/logo.png" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText">Feedback & Suggestion</text>
</view> </view>
</template> </template>
@ -112,16 +112,8 @@
console.log("表是否存在",exist) console.log("表是否存在",exist)
if(!exist){ if(!exist){
let res = await executeSql(sql) let res = await executeSql(sql)
// uni.showToast({
// title:"insert table ok",
// icon:"none"
// })
console.log("新增表scancode",res) console.log("新增表scancode",res)
}else{ }else{
// uni.showToast({
// title:"table exist",
// icon:"none"
// })
console.log("表scancode已存在") console.log("表scancode已存在")
} }
}catch(e){ }catch(e){
@ -285,4 +277,4 @@
} }
} }
</style> </style> -->

95
pages/scan/Calendar.vue

@ -4,8 +4,7 @@
<tn-list-view :card="true" unlined="all" class="listView"> <tn-list-view :card="true" unlined="all" class="listView">
<tn-list-cell class="listItem-1"> <tn-list-cell class="listItem-1">
<view>Subject: {{ calendarInfo.Theme }}</view> <view>Subject: {{ calendarInfo.Theme }}</view>
<view>Start: {{ calendarInfo.startTime.Year +'-'+ calendarInfo.startTime.Month +'-'+ calendarInfo.startTime.Day <view>Start: {{ calendarInfo.startTime }}</view>
+' '+ calendarInfo.startTime.Hours +':'+ calendarInfo.startTime.Minutes +':'+ calendarInfo.startTime.Seconds}}</view>
<view>End: {{ calendarInfo.closeTime }}</view> <view>End: {{ calendarInfo.closeTime }}</view>
<view>Note: {{ calendarInfo.AbstractInfo }}</view> <view>Note: {{ calendarInfo.AbstractInfo }}</view>
<view>Address: {{ calendarInfo.PlaceInfo }}</view> <view>Address: {{ calendarInfo.PlaceInfo }}</view>
@ -37,7 +36,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -50,6 +64,11 @@
calendarInfo:{}, calendarInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -72,8 +91,55 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ addEvent(){
@ -82,8 +148,7 @@
// //
share(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.calendarInfo,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -102,12 +167,12 @@
//copy //copy
copyValue(){ copyValue(){
let that = this; let that = this;
//console.log('') //console.log('',that.calendarInfo)
uni.setClipboardData({ uni.setClipboardData({
data: that.calendarInfo, data: JSON.stringify(that.calendarInfo),
success() { success() {
uni.showToast({ uni.showToast({
title: 'copy success!' title: 'copy success!',
}); });
} }
}) })
@ -193,8 +258,10 @@
Sponsor: data.Sponsor, Sponsor: data.Sponsor,
Theme: data.Theme, Theme: data.Theme,
Condition: data.Condition, Condition: data.Condition,
closeTime: data.closeTime, closeTime: data.closeTime.Year +'-'+ data.closeTime.Month +'-'+ data.closeTime.Day
startTime: data.startTime, +' '+ 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 imgUrl: data.imgUrl
} }
that.calendarInfo = insertData; that.calendarInfo = insertData;
@ -221,7 +288,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -236,8 +303,8 @@
margin-top: 120rpx; margin-top: 120rpx;
background-color: #141b29; background-color: #141b29;
color: #fff; color: #fff;
//border: 2px solid yellow; //border: 2px solid green;
height: 240rpx; height: 260rpx;
text-align: start; text-align: start;
} }
@ -257,8 +324,6 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
// margin-left: 20rpx;
// margin-right: 20rpx;
.toolText{ .toolText{

135
pages/scan/Contacts.vue

@ -3,12 +3,12 @@
<tn-avatar class="icon tn-icon-my" size="xl"></tn-avatar> <tn-avatar class="icon tn-icon-my" size="xl"></tn-avatar>
<tn-list-view :card="true" unlined="all" class="listView"> <tn-list-view :card="true" unlined="all" class="listView">
<tn-list-cell class="listItem-1"> <tn-list-cell class="listItem-1">
<view>Name: {{ contactsInfo.peopleName.FullName }}</view> <view>Name: {{ contactsInfo.peopleName }}</view>
<view>Tel: {{ contactsInfo.phones[0].number }}</view> <view>Tel: {{ contactsInfo.telPhoneNumber }}</view>
<view>E-mail: {{ contactsInfo.emails[0].address }}</view> <view>E-mail: {{ contactsInfo.email }}</view>
<view>Address: {{ contactsInfo.addresses[0].addressLines[0] }}</view> <view>Address: {{ contactsInfo.address }}</view>
<view>Note: {{ contactsInfo.Title }}</view> <view>Note: {{ contactsInfo.title }}</view>
<view>Org: {{ contactsInfo.Company }}</view> <view>Org: {{ contactsInfo.company }}</view>
</tn-list-cell> </tn-list-cell>
<tn-list-cell class="listItem"> <tn-list-cell class="listItem">
<tn-grid align="center" :col="col"> <tn-grid align="center" :col="col">
@ -24,7 +24,7 @@
<view class="toolText">Send email</view> <view class="toolText">Send email</view>
</tn-grid-item> </tn-grid-item>
<tn-grid-item class="toolItem" @click="call()"> <tn-grid-item class="toolItem" @click="call()">
<view class="tn-icon-copy-fill"></view> <view class="tn-icon-tel"></view>
<view class="cutline"></view> <view class="cutline"></view>
<view class="toolText">Call</view> <view class="toolText">Call</view>
</tn-grid-item> </tn-grid-item>
@ -42,7 +42,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -55,6 +70,11 @@
contactsInfo:{}, contactsInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -77,21 +97,97 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ 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 //email
sendEmail(){ 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(){ call(){
uni.makePhoneCall({
phoneNumber: this.contactsInfo.telPhoneNumber //
});
}, },
//copy //copy
@ -99,7 +195,7 @@
let that = this; let that = this;
//console.log('') //console.log('')
uni.setClipboardData({ uni.setClipboardData({
data: that.contactsInfo, data: JSON.stringify(that.contactsInfo),
success() { success() {
uni.showToast({ uni.showToast({
title: 'copy success!' title: 'copy success!'
@ -179,12 +275,21 @@
// //
async initData(option){ async initData(option){
console.log('initoption',option) console.log('initoption',option)
let that = this; let that = this;
let data = JSON.parse(option); 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 = { let insertData = {
Company : data.Company, title: data.Title,
ContactLinks: data.ContactLinks, company : data.Company,
peopleName: data.peopleName, contactLinks: data.ContactLinks,
peopleName: data.peopleName.FullName,
telPhoneNumber: data.TelPhoneNumbers[0].TelPhoneNumber,
email: data.EmailContents[0].AddressInfo,
address: data.AddressesInfos[0],
imgUrl: data.imgUrl imgUrl: data.imgUrl
} }
that.contactsInfo = insertData; that.contactsInfo = insertData;

107
pages/scan/Email.vue

@ -39,7 +39,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback or Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -52,6 +67,11 @@
emailInfo:{}, emailInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -74,23 +94,92 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ 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(){ 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(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.emailInfo.addressInfo,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -111,7 +200,7 @@
let that = this; let that = this;
//console.log('') //console.log('')
uni.setClipboardData({ uni.setClipboardData({
data: that.emailInfo, data: JSON.stringify(that.emailInfo),
success() { success() {
uni.showToast({ uni.showToast({
title: 'copy success!' title: 'copy success!'
@ -124,10 +213,6 @@
async openSqlite(){ async openSqlite(){
try{ try{
let b = await openSqlite() let b = await openSqlite()
// uni.showToast({
// title:"open db success",
// icon:"none"
// })
console.log('db打开了'); console.log('db打开了');
}catch(e){ }catch(e){
console.error("open db error",e) console.error("open db error",e)
@ -234,7 +319,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{

71
pages/scan/Location.vue

@ -38,7 +38,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -51,6 +66,11 @@
locationInfo:{}, locationInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -73,8 +93,55 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ showMap(){
@ -220,7 +287,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{

74
pages/scan/Product.vue

@ -37,7 +37,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -50,6 +65,11 @@
productInfo:{}, productInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -72,8 +92,55 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ openShoping(){
let that = this; let that = this;
@ -87,8 +154,7 @@
// //
share(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.productInfo.message ,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -228,7 +294,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{

29
pages/scan/Scan.nvue

@ -21,19 +21,6 @@
<!-- <button @click="scanCode()">扫码</button> --> <!-- <button @click="scanCode()">扫码</button> -->
<tn-button shape="round" backgroundColor="#01BEFF" fontColor="#080808" @click="jumpToPage('/pages/scan/Barcode')">跳转Barcode页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Book','history',{})">跳转Book页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Calendar','history',{})">跳转Calendar页面</tn-button>
<tn-button shape="round" @clicksss="jumpToPage('/pages/scan/Contacts','history',{})">跳转Contacts页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Email','history',{})">跳转Email页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Location','history',{})">跳转Location页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Paypal','history',{})">跳转Paypal页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Product','history',{})">跳转Product页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Sms','history',{})">跳转Sms页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Tel','history',{})">跳转Tel页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Text','history',{})">跳转Text页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Url','history',{})">跳转Url页面</tn-button>
<tn-button shape="round" @click="jumpToPage('/pages/scan/Wifi','history',{})">跳转Wifi页面</tn-button>
<!-- <button type="primary" @click="clearData()">清空数据 </button> <!-- <button type="primary" @click="clearData()">清空数据 </button>
<button type="primary" @click="deleteTable()">删除数据表</button> --> <button type="primary" @click="deleteTable()">删除数据表</button> -->
@ -121,9 +108,11 @@
that.jumpToPage('/pages/scan/Contacts','scan',JSON.stringify(result)) that.jumpToPage('/pages/scan/Contacts','scan',JSON.stringify(result))
}else if(type === 'email'){ }else if(type === 'email'){
that.jumpToPage('/pages/scan/Email','scan',JSON.stringify(result)) 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 === 3){
}else if(type === 'tel_phone'){ // that.jumpToPage('/pages/scan/Book','scan',JSON.stringify(result))
// }
else if(type === 'tel_phone'){
that.jumpToPage('/pages/scan/Tel','scan',JSON.stringify(result)) that.jumpToPage('/pages/scan/Tel','scan',JSON.stringify(result))
}else if(type === 'article'){ }else if(type === 'article'){
that.jumpToPage('/pages/scan/Product','scan',JSON.stringify(result)) that.jumpToPage('/pages/scan/Product','scan',JSON.stringify(result))
@ -174,10 +163,6 @@
async openSqlite(){ async openSqlite(){
try{ try{
let b = await openSqlite() let b = await openSqlite()
// uni.showToast({
// title:"open db success",
// icon:"none"
// })
console.log('db打开了'); console.log('db打开了');
}catch(e){ }catch(e){
console.error("open db error",e) console.error("open db error",e)
@ -276,7 +261,9 @@
.bg{ .bg{
width: 750rpx; width: 750rpx;
flex: 1; flex: 1;
/* #ifndef APP-PLUS-NVUE */
background-color: #00ffffff; background-color: #00ffffff;
/* #endif */
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
@ -321,7 +308,7 @@
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
margin-top: 200rpx; margin-top: 200rpx;
background-color: #707070; background-color: #000000;
border-radius: 100%; border-radius: 100%;
} }

140
pages/scan/Sms.vue

@ -9,10 +9,20 @@
<tn-list-cell class="listItem"> <tn-list-cell class="listItem">
<tn-grid align="center" :col="col"> <tn-grid align="center" :col="col">
<block> <block>
<tn-grid-item class="toolItem" @click="openWeb()"> <tn-grid-item class="toolItem" @click="sendMessage()">
<view class="tn-icon-search"></view> <view class="tn-icon-email"></view>
<view class="cutline"></view> <view class="cutline"></view>
<view class="toolText">Web Search</view> <view class="toolText">Send SMS</view>
</tn-grid-item>
<tn-grid-item class="toolItem" @click="share()">
<view class="tn-icon-share-triangle"></view>
<view class="cutline"></view>
<view class="toolText">Share</view>
</tn-grid-item>
<tn-grid-item class="toolItem" @click="copyValue()">
<view class="tn-icon-copy-fill"></view>
<view class="cutline"></view>
<view class="toolText">Copy</view>
</tn-grid-item> </tn-grid-item>
</block> </block>
</tn-grid> </tn-grid>
@ -23,7 +33,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -32,32 +57,15 @@
export default { export default {
data() { data() {
return { return {
col: 4, col: 3,
smsInfo:{}, smsInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
fastToolList:[
{ starRateValue: 5, //
"index": 0, showStarTip: false, //
"text":"Send SMS", startTipColor: '#706F6F', //
"icon": "tn-icon-email" startTipFontColor: '#fff' //
},
{
"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"
}
]
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -81,6 +89,79 @@
that.closedb(); that.closedb();
}, },
methods: { 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(){ async openSqlite(){
try{ try{
@ -182,7 +263,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -217,8 +298,7 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
margin-left: 20rpx;
margin-right: 20rpx;
.toolText{ .toolText{

105
pages/scan/Tel.vue

@ -37,7 +37,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -50,6 +65,11 @@
telInfo:{}, telInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -72,23 +92,92 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ 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(){ call(){
uni.makePhoneCall({
phoneNumber: this.telInfo.TelPhoneNumber //
});
}, },
// //
share(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.telInfo.TelPhoneNumber,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -109,7 +198,7 @@
let that = this; let that = this;
//console.log('') //console.log('')
uni.setClipboardData({ uni.setClipboardData({
data: telInfo.TelPhoneNumber, data: that.telInfo.TelPhoneNumber,
success() { success() {
uni.showToast({ uni.showToast({
title: 'copy success!' title: 'copy success!'
@ -218,7 +307,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -253,8 +342,6 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
margin-left: 20rpx;
margin-right: 20rpx;
.toolText{ .toolText{

82
pages/scan/Text.vue

@ -32,7 +32,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -41,10 +56,15 @@
export default { export default {
data() { data() {
return { return {
col: 4, col: 3,
textInfo:{}, textInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -67,12 +87,60 @@
let that = this; let that = this;
that.closedb(); 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: { 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(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.textInfo.message,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -91,7 +159,7 @@
// //
openWeb(){ openWeb(){
let that = this; let that = this;
console.log('that.textInfo.message',that.textInfo.message) //console.log('that.textInfo.message',that.textInfo.message)
uni.navigateTo({ uni.navigateTo({
url: '/pages/webview/webview?url=https://www.baidu.com/s?wd=' + that.textInfo.message 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 //url: '/pages/webview/webview?url=http://www.google.com?wd=' + that.textInfo.message
@ -213,7 +281,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -249,8 +317,6 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
margin-left: 20rpx;
margin-right: 20rpx;
.toolText{ .toolText{

98
pages/scan/Url.vue

@ -32,7 +32,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -45,23 +60,11 @@
urlInfo:{}, urlInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '', textImgUrl: '',
fastToolList:[
{ starRateValue: 5, //
"index": 0, showStarTip: false, //
"text":"Open", startTipColor: '#706F6F', //
"icon": "tn-icon-plane" startTipFontColor: '#fff' //
},
{
"index": 1,
"text":"Copy",
"icon": "tn-icon-copy-fill"
},
{
"index": 2,
"text":"Share",
"icon": "tn-icon-share-triangle"
}
]
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -82,9 +85,57 @@
onHide() { onHide() {
let that = this; let that = this;
that.closedb(); 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: { 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 //url
openUrl(){ openUrl(){
let that = this; let that = this;
@ -96,8 +147,7 @@
// //
share(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: this.urlInfo.LinkValue ,
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -227,7 +277,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -262,8 +312,6 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
margin-left: 20rpx;
margin-right: 20rpx;
.toolText{ .toolText{
font-size: 24rpx; font-size: 24rpx;
@ -320,5 +368,9 @@
border: 1px solid #8f8f94; border: 1px solid #8f8f94;
} }
.starTipText{
color: #fff;
font-size: 48rpx;
}
} }
</style> </style>

83
pages/scan/Wifi.vue

@ -33,7 +33,22 @@
<image :src="textImgUrl" class="buttomImg"/> <image :src="textImgUrl" class="buttomImg"/>
</tn-list-cell> </tn-list-cell>
</tn-list-view> </tn-list-view>
<text class="bottomText">Feedback or Suggestion</text> <text class="bottomText" @click="jumpToFeedback()">Feedback & Suggestion</text>
<tn-modal v-model="showStarTip" :custom="true" :backgroundColor="startTipColor">
<view class="startTipContent">
<view slot="left" class="tn-icon tn-icon-about-fill">
<view class="starTipText">Do you like this app?</view>
</view>
<view slot="center" class="tn-icon tn-icon-about-fill">
<tn-rate v-model="starRateValue" :size="80" :allowHalf="true" activeColor="#0186FF"></tn-rate>
</view>
<view slot="right" class="tn-icon tn-icon-about-fill">
<tn-button :fontSize="36" margin="30rpx" height="46rpx" backgroundColor="#0186FF" fontColor="tn-color-white" @click="starTipSubmit()">submit</tn-button>
</view>
</view>
</tn-modal>
<tn-toast ref="toast"></tn-toast>
</view> </view>
</template> </template>
@ -42,10 +57,15 @@
export default { export default {
data() { data() {
return { return {
col: 4, col: 3,
wifiInfo:{}, wifiInfo:{},
tableName: 'scan_code', tableName: 'scan_code',
textImgUrl: '' textImgUrl: '',
starRateValue: 5, //
showStarTip: false, //
startTipColor: '#706F6F', //
startTipFontColor: '#fff' //
} }
}, },
async onLoad(option) { async onLoad(option) {
@ -68,14 +88,63 @@
let that = this; let that = this;
that.closedb(); 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: { 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 //wifi
connectWifi(){ connectWifi(){
let that = this; let that = this;
uni.connectWifi({ uni.connectWifi({
SSID: that.wifiInfo.ssidNumber, SSID: that.wifiInfo.ssidNumber,
password: that.wifiInfo.password, password: that.wifiInfo.password,
maunal: true,
//maunal: false//,android 10 maunal //maunal: false//,android 10 maunal
success() { success() {
uni.showToast({ uni.showToast({
@ -93,8 +162,7 @@
// //
share(){ share(){
uni.shareWithSystem({ uni.shareWithSystem({
summary: '', summary: JSON.stringify(this.wifiInfo),
href: 'https://uniapp.dcloud.io',
success(){ success(){
// //
uni.showToast({ uni.showToast({
@ -227,7 +295,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;
.listView{ .listView{
@ -262,9 +330,6 @@
color: #8f8f94; color: #8f8f94;
height: 120rpx; height: 120rpx;
text-align: center; text-align: center;
margin-left: 20rpx;
margin-right: 20rpx;
.toolText{ .toolText{
font-size: 24rpx; font-size: 24rpx;

2
pages/setting/Setting.vue

@ -248,7 +248,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #000000; background-color: #1F222B;
height:100vh; height:100vh;

Loading…
Cancel
Save