图片资源换到服务器;删除多余文件

main
xuechunyuan 2 years ago
parent 6a38b7e1fe
commit 62e61ef490
  1. 6
      App.vue
  2. 6
      pages/pages_zhentou/contact/contact.vue
  3. 19
      pages/pages_zhentou/form/form.vue
  4. 8
      pages/pages_zhentou/homePage/homePage.vue
  5. 1
      pages/pages_zhentou/myPage/address.vue
  6. 3
      pages/pages_zhentou/order/checkOrder.vue
  7. 374
      pages/pages_zhentou/order/order.vue
  8. 232
      platforms/app-plus/feedback/feedback.vue
  9. 64
      platforms/app-plus/orientation/orientation.vue
  10. 69
      platforms/app-plus/proximity/proximity.vue
  11. 81
      platforms/app-plus/push/push.vue
  12. 106
      platforms/app-plus/shake/shake.vue
  13. 105
      platforms/app-plus/speech/speech.vue
  14. BIN
      static/60x60.png
  15. BIN
      static/api.png
  16. BIN
      static/apiHL.png
  17. BIN
      static/apiIndex.png
  18. BIN
      static/app-plus/location@3x.png
  19. BIN
      static/app-plus/uni@2x.png
  20. BIN
      static/c1.png
  21. BIN
      static/c2.png
  22. BIN
      static/c3.png
  23. BIN
      static/c4.png
  24. BIN
      static/c5.png
  25. BIN
      static/c6.png
  26. BIN
      static/c7.png
  27. BIN
      static/c8.png
  28. BIN
      static/c9.png
  29. BIN
      static/compass.png
  30. BIN
      static/component.png
  31. BIN
      static/componentHL.png
  32. BIN
      static/componentIndex.png
  33. 20
      static/customicons.css
  34. BIN
      static/customicons.ttf
  35. BIN
      static/extui.png
  36. BIN
      static/extuiHL.png
  37. BIN
      static/extuiIndex.png
  38. BIN
      static/home-active.png
  39. BIN
      static/home.png
  40. 32
      static/iconfont.css
  41. BIN
      static/iconfont.ttf
  42. BIN
      static/icons/badge.png
  43. BIN
      static/icons/button.png
  44. BIN
      static/icons/calendar.png
  45. BIN
      static/icons/card.png
  46. BIN
      static/icons/collapse.png
  47. BIN
      static/icons/color.png
  48. BIN
      static/icons/combox.png
  49. BIN
      static/icons/countdown.png
  50. BIN
      static/icons/data-checkbox.png
  51. BIN
      static/icons/data-picker.png
  52. BIN
      static/icons/dateformat.png
  53. BIN
      static/icons/datetime-picker.png
  54. BIN
      static/icons/drawer.png
  55. BIN
      static/icons/easyinput.png
  56. BIN
      static/icons/fab.png
  57. BIN
      static/icons/fav.png
  58. BIN
      static/icons/file-picker.png
  59. BIN
      static/icons/font.png
  60. BIN
      static/icons/forms.png
  61. BIN
      static/icons/goods-nav.png
  62. BIN
      static/icons/grid.png
  63. BIN
      static/icons/group.png
  64. BIN
      static/icons/icons.png
  65. BIN
      static/icons/indexed-list.png
  66. BIN
      static/icons/link.png
  67. BIN
      static/icons/list.png
  68. BIN
      static/icons/load-more.png
  69. BIN
      static/icons/nav-bar.png
  70. BIN
      static/icons/notice-bar.png
  71. BIN
      static/icons/number-box.png
  72. BIN
      static/icons/pagination.png
  73. BIN
      static/icons/popup.png
  74. BIN
      static/icons/radius.png
  75. BIN
      static/icons/rate.png
  76. BIN
      static/icons/row.png
  77. BIN
      static/icons/search-bar.png
  78. BIN
      static/icons/section.png
  79. BIN
      static/icons/segmented-control.png
  80. BIN
      static/icons/space.png
  81. BIN
      static/icons/steps.png
  82. BIN
      static/icons/swipe-action.png
  83. BIN
      static/icons/swiper-dot.png
  84. BIN
      static/icons/tag.png
  85. BIN
      static/icons/title.png
  86. BIN
      static/icons/transition.png
  87. BIN
      static/image-active.png
  88. BIN
      static/image.png
  89. BIN
      static/image/add.jpg
  90. BIN
      static/image/add.png
  91. BIN
      static/image/add_bag.png
  92. BIN
      static/image/bag.jpg
  93. BIN
      static/image/bag.png
  94. BIN
      static/image/ce.jpg
  95. BIN
      static/image/jian.png
  96. BIN
      static/image/length.jpg
  97. BIN
      static/image/top.jpg
  98. BIN
      static/image/top.png
  99. BIN
      static/image/uniui-header-bg.png
  100. BIN
      static/image/uniui-logo.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -60,7 +60,9 @@
globalData: {
openId: '',
test: '',
baseUrl: "http://192.168.3.32:80",
// baseUrl: "http://192.168.3.32:80",
baseUrl: "http://192.168.1.106:80",
imgPrefix: "http://47.104.224.41:9000/etriphome/appresource/image/",//
},
methods: {
...mapMutations(['setUniverifyErrorMsg', 'setUniverifyLogin']),
@ -163,7 +165,7 @@
/* #ifndef APP-PLUS-NVUE */
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
@import './common/uni.css';
@import '@/static/customicons.css';
// @import '@/static/customicons.css';
/* H5 兼容 pc 所需 */
/* #ifdef H5 */

@ -3,7 +3,7 @@
<view class="contact_box">
<view class="qrcode_bg">
<image src="../../../static/image/logo.png" class="contact_logo"></image>
<image src="../../../static/image/add.png" class="qrcode"></image>
<image :src="imgPrefix + 'add.png'" class="qrcode"></image>
<view class="contact_txt">
<image src="../../../static/image/icon-contact.png" style="width: 44rpx; height: 44rpx;"></image>
<text class="txt">壹人壹枕</text>
@ -17,7 +17,9 @@
<script>
export default {
data() {
return {}
return {
imgPrefix: getApp().globalData.imgPrefix,
}
},
methods: {}
}

@ -5,7 +5,7 @@
<view class="rele_content">
<view class="form_box">
<view class="top_header">
<img class="top_img" src="../../../static/image/top.png" alt="">
<img class="top_img" :src="imgPrefix + 'top.png'" alt="">
</view>
<view class="top_content">
<view class="title">
@ -62,7 +62,7 @@
</uni-forms-item>
<uni-forms-item label="颈肩宽度示意图">
<view class="wid_pre">
<img class="wid_img" src="../../../static/image/jian.png" alt="">
<img class="wid_img" :src="imgPrefix + 'jian.png'" alt="">
<uni-data-checkbox v-model="valiFormData.width" :localdata="widthData" />
</view>
</uni-forms-item>
@ -72,7 +72,7 @@
</uni-forms-item>
<uni-forms-item label="颈长示意图">
<view class="hei_pre">
<img class="hei_img" src="../../../static/image/length.jpg" alt="">
<img class="hei_img" :src="imgPrefix + 'length.jpg'" alt="">
<uni-data-checkbox v-model="valiFormData.length" :localdata="lengthData" />
</view>
</uni-forms-item>
@ -85,12 +85,12 @@
<uni-forms-item label="您习惯的睡眠姿势" required name="sleepingPosture">
<view class="pos_box">
<view class="pos_pre">
<img class="hei_img" src="../../../static/image/yang.jpg" alt="">
<img class="hei_img" :src="imgPrefix + 'yang.jpg'" alt="">
<uni-data-checkbox v-model="valiFormData.sleepingPosture"
:localdata="sleepPosData" />
</view>
<view class="pos_pre">
<img class="hei_img" src="../../../static/image/ce.jpg" alt="">
<img class="hei_img" :src="imgPrefix + 'ce.jpg'" alt="">
<uni-data-checkbox v-model="valiFormData.sleepingPosture"
:localdata="sleepPosData1" />
</view>
@ -134,7 +134,7 @@
</view>
<view class="code_box" v-if="isShowCode">
<span style="color: #333;font-size: 28rpx;margin-bottom: 12rpx;">扫码添加</span>
<img class="code_img" src="../../../static/image/add.png" alt="">
<img class="code_img" :src="imgPrefix + 'add.png'" alt="">
</view>
<view class="link_box" v-if="widthScreen > 750" @click="isShowLink = !isShowLink">
<uni-icons type="phone" size="20" color="#2eaadd"></uni-icons>
@ -142,7 +142,7 @@
</view>
<view class="add_item" v-if="isShowLink">
<span style="color: #333;font-size: 28rpx;margin-bottom: 12rpx;">扫码添加</span>
<img class="code_img" src="../../../static/image/add.jpg" alt="">
<img class="code_img" :src="imgPrefix + 'add.jpg'" alt="">
</view>
</view>
@ -159,6 +159,7 @@
export default {
data() {
return {
imgPrefix: getApp().globalData.imgPrefix,
isShowLink:false,
fontsize: 12,
//
@ -599,7 +600,7 @@
position: relative;
/* max-width: 1920px;
max-height: 920px; */
background-image: url('../../../static/image/bag.png');
background-image: url('http://47.104.224.41:9000/etriphome/appresource/image/bag.png');
background-position: top center;
background-size: cover;
background-repeat: no-repeat;
@ -898,7 +899,7 @@
.code_box {
width: 350rpx;
height: 320rpx;
background: url('../../../static/image/add_bag.png') no-repeat;
background: url('http://47.104.224.41:9000/etriphome/appresource/image/add_bag.png') no-repeat;
background-size: 100% 100%;
position: fixed;
right: 24rpx;

@ -62,7 +62,7 @@
if (JSON.stringify(res.data.data) !== '{}') {
this.bgSrc = res.data.data.imgPath;
} else {
this.bgSrc = '../../../static/image/bag.jpg';
this.bgSrc = getApp().globalData.imgPrefix + 'bag.jpg';
}
}
})
@ -71,7 +71,7 @@
clickCustom() {
console.log('点击定制');
uni.request({
url: 'http://192.168.1.106:80/blade-desk/order/save', //getApp().globalData.baseUrl + '/blade-desk/order/save',
url: getApp().globalData.baseUrl + '/blade-desk/order/save',
method: 'POST',
data: {
buyerId: this.userInfo.id,
@ -83,9 +83,9 @@
},
success: (res) => {
if (res.data.code == 200) {
console.log('下单成功')
} else if (res.data.code == 401) {
this.doLogin();
} else {
uni.showToast({
title: res.data.msg,

@ -40,6 +40,7 @@
export default {
data() {
return {
imgPrefix: getApp().globalData.imgPrefix,
addressData: [
{name:'张三',phone:'15612345678',address:'山东省青岛市市北区大港街道大港三路8号铁路住宅小区6号楼6单元666室',status:1},
{name:'张三',phone:'15612345678',address:'山东省青岛市市北区大港街道大港三路8号铁路住宅小区6号楼6单元666室',status:0},

@ -12,7 +12,7 @@
</view>
<view class="top_content">
<view class="left_cont">
<image class="img_box" src="../../../static/image/zhentou_bag.png" mode=""></image>
<image class="img_box" :src="imgPrefix + 'zhentou_bag.png'" mode=""></image>
</view>
<view class="right_cont">
<p class="right_title">易旅家居壹人壹枕枕头科学化定制</p>
@ -86,6 +86,7 @@
export default {
data() {
return {
imgPrefix: getApp().globalData.imgPrefix,
orderData:{status:5,content:''},
}
},

@ -19,14 +19,15 @@
</view>
<view class="top_content">
<view class="left_cont">
<image class="img_box" src="../../../static/image/zhentou_bag.png" mode=""></image>
<image class="img_box" :src="imgPrefix + 'zhentou_bag.png'" mode=""></image>
</view>
<view class="right_cont">
<p class="right_title">易旅家居壹人壹枕枕头科学化定制</p>
<p class="right_title">{{item.goodsName}}</p>
<p class="bot_right">
<span style="font-size: 22rpx;color: #666;">1</span>
<span style="font-size: 22rpx;color: #666;">{{item.goodsNum}}</span>
<span>
<span style="font-size: 22rpx;color: #333;"></span><span style="font-size: 28rpx;color: #333;">699.0</span>
<span style="font-size: 22rpx;color: #333;"></span><span
style="font-size: 28rpx;color: #333;">{{item.goodsPrice}}</span>
</span>
</p>
</view>
@ -57,6 +58,8 @@
</view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
:content-text="contentText"></uni-load-more>
</view>
</template>
@ -64,24 +67,61 @@
export default {
data() {
return {
active:1,
orderData:[
{status:2,content:'【青岛市】正常签收,签收人:***'},
{status:3,content:''},
{status:4,content:''},
{status:5,content:''},
{status:6,content:''},
]
imgPrefix: getApp().globalData.imgPrefix,
active: 1,
orderData: [],
current: 0,
size: 10,
hasMore: true,
status: '',
contentText: {
contentdown: "点击查看更多",
contentrefresh: "正在加载...",
contentnomore: "没有更多数据了",
}
}
},
mounted() {
this.loadMore();
},
methods: {
handleTab(val){
loadMore() {
if (this.hasMore) {
this.current = this.current + 1;
this.staus = 'loading';
uni.request({
url: getApp().globalData.baseUrl + '/blade-desk/order/page?current=' + this.current + '&size=' + this
.size,
method: 'GET',
header: {
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success: (res) => {
if (res.data.code == 200) {
this.orderData = this.orderData.concat(res.data.data.records);
if (res.data.data.records.length == 0 || res.data.data.total < this.size) {
this.hasMore = false;
this.status = 'nomore';
} else {
this.status = 'more';
}
} else {
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
}
},
handleTab(val) {
this.active = val
},
handleCheck(row){
handleCheck(row) {
let item = encodeURIComponent(JSON.stringify(row))
uni.navigateTo({
url:"/pages/pages_zhentou/order/checkOrder?row=" + item
url: "/pages/pages_zhentou/order/checkOrder?row=" + item
})
},
}
@ -89,170 +129,178 @@
</script>
<style lang="scss" scoped>
.order_box{
.order_title{
width: 100%;
height: 100rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: space-around;
.tit{
padding-bottom: 10rpx;
font-size: 26rpx;
color: #333;
&.actived{
border-bottom: 5rpx solid #D73232;
color: #D73232;
}
}
}
.order_content{
width: 100%;
height: auto;
overflow-y: auto;
.order_item{
width: 690rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin:0 auto;
margin-top: 30rpx;
padding-bottom: 30rpx;
.top_title{
padding: 30rpx 31rpx 25rpx;
display: flex;
justify-content: space-between;
.title{
font-size: 28rpx;
}
.status_txt{
font-size: 24rpx;
.order_box {
.order_title {
width: 100%;
height: 100rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: space-around;
.tit {
padding-bottom: 10rpx;
font-size: 26rpx;
color: #333;
&.actived {
border-bottom: 5rpx solid #D73232;
color: #D73232;
}
}
.top_content{
width: 630rpx;
height: 160rpx;
background: #F8F8F8;
border-radius: 20rpx;
}
.order_content {
width: 100%;
height: auto;
overflow-y: auto;
.order_item {
width: 690rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin: 0 auto;
display: flex;
.left_cont{
width: 160rpx;
height: 160rpx;
.img_box{
width: 100%;
height: 100%;
margin-top: 30rpx;
padding-bottom: 30rpx;
.top_title {
padding: 30rpx 31rpx 25rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 28rpx;
}
.status_txt {
font-size: 24rpx;
}
}
.right_cont{
width: 470rpx;
padding:0rpx 30rpx;
.right_title{
margin-top: 20rpx;
font-size: 26rpx;
.top_content {
width: 630rpx;
height: 160rpx;
background: #F8F8F8;
border-radius: 20rpx;
margin: 0 auto;
display: flex;
.left_cont {
width: 160rpx;
height: 160rpx;
.img_box {
width: 100%;
height: 100%;
}
}
.bot_right{
margin-top: 49rpx;
display: flex;
justify-content: space-between;
.right_cont {
width: 470rpx;
padding: 0rpx 30rpx;
.right_title {
margin-top: 20rpx;
font-size: 26rpx;
}
.bot_right {
margin-top: 49rpx;
display: flex;
justify-content: space-between;
}
}
}
}
.sh_box{
width: 630rpx;
height: 70rpx;
margin: 0 auto;
margin-top: 20rpx;
background: #F8F8F8;
border-radius: 20rpx 20rpx 20rpx 20rpx;
display: flex;
align-items: center;
.img_box{
width: 40rpx;
height: 40rpx;
margin-left: 18rpx;
.image{
width: 100%;
height: 100%;
.sh_box {
width: 630rpx;
height: 70rpx;
margin: 0 auto;
margin-top: 20rpx;
background: #F8F8F8;
border-radius: 20rpx 20rpx 20rpx 20rpx;
display: flex;
align-items: center;
.img_box {
width: 40rpx;
height: 40rpx;
margin-left: 18rpx;
.image {
width: 100%;
height: 100%;
}
}
}
.add_box{
width: 85%;
font-size: 24rpx;
color: #666;
}
.turn_box{
width: 40rpx;
height: 40rpx;
.image{
width: 100%;
height: 100%;
.add_box {
width: 85%;
font-size: 24rpx;
color: #666;
}
.turn_box {
width: 40rpx;
height: 40rpx;
.image {
width: 100%;
height: 100%;
}
}
}
}
.pay_box{
width: 100%;
margin-top: 36rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.mon_txt{
margin-right: 30rpx;
color: #333;
}
.pay_txt{
font-size: 26rpx;
color: #333;
}
}
.btn_box{
width: 100%;
height: 60rpx;
margin: 35rpx 0 0;
display: flex;
justify-content: flex-end;
.btn{
width: 161rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
opacity: 1;
border: 1rpx solid #A5A5A5;
margin-right: 30rpx;
.pay_box {
width: 100%;
margin-top: 36rpx;
display: flex;
align-items: center;
justify-content: center;
color: #666666;
&.confirm{
border: 1rpx solid #D73232;
color: #D73232;
justify-content: flex-end;
.mon_txt {
margin-right: 30rpx;
color: #333;
}
.pay_txt {
font-size: 26rpx;
color: #333;
}
&.info{
width: 210rpx;
}
.btn_box {
width: 100%;
height: 60rpx;
margin: 35rpx 0 0;
display: flex;
justify-content: flex-end;
.btn {
width: 161rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
opacity: 1;
border: 1rpx solid #A5A5A5;
margin-right: 30rpx;
display: flex;
align-items: center;
justify-content: center;
color: #666666;
&.confirm {
border: 1rpx solid #D73232;
color: #D73232;
}
&.info {
width: 210rpx;
}
}
}
}
}
}
}
</style>
</style>

@ -1,232 +0,0 @@
<template>
<view class="page">
<view class="feedback-title">
<text>问题和意见</text>
<text class="feedback-quick" @tap="chooseMsg">快速键入</text>
</view>
<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare"></textarea></view>
<view class="feedback-title"><text>图片(选填,提供问题截图,总大小10M以下)</text></view>
<view class="feedback-body feedback-uploader">
<view class="uni-uploader">
<view class="uni-uploader-head">
<view class="uni-uploader-title">点击预览图片</view>
<view class="uni-uploader-info">{{ imageList.length }}/5</view>
</view>
<view class="uni-uploader-body">
<view class="uni-uploader__files">
<block v-for="(image, index) in imageList" :key="index">
<view class="uni-uploader__file" style="position: relative;">
<image class="uni-uploader__img" :src="image" @tap="previewImage(index)"></image>
<view class="close-view" @click="close(index)">x</view>
</view>
</block>
<view class="uni-uploader__input-box" v-show="imageList.length < 5"><view class="uni-uploader__input" @tap="chooseImg"></view></view>
</view>
</view>
</view>
</view>
<view class="feedback-title"><text>QQ/邮箱</text></view>
<view class="feedback-body"><input class="feedback-input" v-model="sendDate.contact" placeholder="(选填,方便我们联系你 )" /></view>
<view class="feedback-title feedback-star-view">
<text>应用评分</text>
<view class="feedback-star-view"><uni-rate v-model="sendDate.score" color="#bbb"></uni-rate></view>
</view>
<button type="default" class="feedback-submit" @tap="send">提交</button>
<view class="feedback-title"><text>用户反馈的结果可在app打包后于DCloud开发者中心查看</text></view>
</view>
</template>
<script>
export default {
data() {
return {
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 0,
content: '',
contact: ''
}
};
},
onLoad() {
this.deviceInfo = {
// appid: plus.runtime.appid,
appid: '__UNI__5D0B0CA',
imei: plus.device.imei, //
p: plus.os.name === 'Android' ? 'a' : 'i', //iiOSaAndroid
md: plus.device.model, //
app_version: plus.runtime.version,
plus_version: plus.runtime.innerVersion, //
os: plus.os.version,
net: '' + plus.networkinfo.getCurrentType()
};
this.sendDate = Object.assign(this.deviceInfo, this.sendDate);
},
methods: {
/**
* 关闭图片
* @param {Object} e
*/
close(e) {
this.imageList.splice(e, 1);
},
/**
* 快速输入
*/
chooseMsg() {
uni.showActionSheet({
itemList: this.msgContents,
success: res => {
this.sendDate.content = this.msgContents[res.tapIndex];
}
});
},
/**
* 选择图片
*/
chooseImg() {
//
uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: 'compressed',
count: 5 - this.imageList.length,
success: res => {
this.imageList = this.imageList.concat(res.tempFilePaths);
}
});
},
/**
* 评分
* @param {Object} e
*/
chooseStar(e) {
//
this.sendDate.score = e;
},
/**
* 预览图片
* @param {Object} index
*/
previewImage(index) {
uni.previewImage({
urls: this.imageList,
current: this.imageList[index]
});
},
/**
* 提交
*/
send() {
//
if (this.sendDate.content.length === 0) {
uni.showModal({
content: '请输入问题和意见',
showCancel: false
});
return;
}
uni.showLoading({
title: '上传中...'
});
let imgs = this.imageList.map((value, index) => {
return {
name: 'images' + index,
uri: value
};
});
// TODO 2M, 5
this.request(this.sendDate, imgs)
.then(res => {
if (typeof res.data === 'string') {
res.data = JSON.parse(res.data);
}
if (res.statusCode === 200 && res.data && res.data.ret === 0) {
uni.showModal({
content: '反馈成功',
showCancel: false
});
this.imageList = [];
this.sendDate = Object.assign(this.deviceInfo, {
score: 0,
content: '',
contact: ''
});
} else if (res.statusCode !== 200) {
uni.showModal({
content: '反馈失败,错误码为:' + res.statusCode,
showCancel: false
});
} else {
uni.showModal({
content: '反馈失败',
showCancel: false
});
}
})
.catch(err => {
console.log(err);
});
},
/**
* 发送请求到后台
*/
request(sendDate, imgs) {
return new Promise((resolve, reject) => {
let fromData = {
url: 'https://service.dcloud.net.cn/feedback',
success: res => {
resolve(res);
},
fail: res => {
reject(res);
},
complete() {
uni.hideLoading();
}
};
if (imgs.length > 0) {
fromData.files = imgs;
fromData.formData = sendDate;
uni.uploadFile(fromData);
} else {
fromData.data = sendDate;
fromData.method = 'POST';
uni.request(fromData);
}
});
}
}
};
</script>
<style>
page {
background-color: #efeff4;
}
.input-view {
font-size: 28rpx;
}
.close-view {
text-align: center;
line-height: 14px;
height: 16px;
width: 16px;
border-radius: 50%;
background: #ff5053;
color: #ffffff;
position: absolute;
top: -6px;
right: -4px;
font-size: 12px;
}
</style>

@ -1,64 +0,0 @@
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-btn-v">
<button type="primary" @tap="getOrient">获取设备的方向信息</button>
<button type="primary" @tap="watchOrient">监听设备的方向变化</button>
<button type="primary" @tap="watchStop">停止监听</button>
</view>
<view class="uni-textarea">
<textarea :value="value" />
</view>
</view>
</view>
</template>
<script>
var id = null
export default {
data() {
return {
title: 'orientation',
value: ''
}
},
onUnload() {
this.watchStop();
},
methods: {
getOrient: function () {
var that = this;
plus.orientation.getCurrentOrientation(function (o) {
that.value = "alpha:" + o.alpha + "\nbeta:" + o.beta + "\ngamma:" + o.gamma;
}, function (e) {
console.log("获取失败:" + e.message);
});
},
watchOrient: function () {
var that = this;
if (id) {
return;
}
id = plus.orientation.watchOrientation(function (o) {
that.value = "监听设备方向变化信息\n" + "alpha:" + o.alpha + "\nbeta:" + o.beta + "\ngamma:" + o.gamma;
}, function (e) {
plus.orientation.clearWatch(id);
id = null;
console.log("监听失败:" + e.message);
});
},
watchStop: function () {
if (id) {
plus.orientation.clearWatch(id);
id = null;
} else {
console.log("没有监听设备方向变化");
}
}
}
}
</script>
<style>
</style>

@ -1,69 +0,0 @@
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-hello-text">
手机顶部听筒处有传感器监听距离手机屏幕的障碍物覆盖该传感器会触发本事件变化
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @tap="getProximity">获取距离传感器信息</button>
<button type="primary" @tap="watchProximity">监听距离传感器变化</button>
<button type="primary" @tap="watchStop">停止监听</button>
</view>
<view class="uni-textarea uni-common-mt">
<textarea :value="value" />
</view>
</view>
</view>
</template>
<script>
var id = null
var bright = null
export default {
data() {
return {
title: 'proximity',
value: ''
}
},
methods: {
getProximity: function () {
var that = this;
plus.proximity.getCurrentProximity(function (d) {
that.value = "距离为:" + d;
}, function (e) {
that.value = "获取失败:" + e.message;
});
},
watchProximity: function () {
var that = this;
if (id) {
return;
}
bright = plus.screen.getBrightness();
id = plus.proximity.watchProximity(function (d) {
that.value = "距离变化:" + d;
plus.screen.setBrightness((d < 1) ? 0.01 : bright);
}, function (e) {
plus.proximity.clearWatch(id);
id = null;
that.value = "监听失败:" + e.message;
});
},
watchStop: function () {
var that = this;
if (id) {
that.value = "停止监听设备距离传感器信息";
plus.proximity.clearWatch(id);
id = null;
} else {
that.value = "没有监听设备距离传感器";
}
}
}
}
</script>
<style>
</style>

@ -1,81 +0,0 @@
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap" v-if="provider[0]">
<view class="uni-btn-v uni-common-mt">
<button type="primary" @tap="listenTranMsg">监听透传数据</button>
</view>
<view class="uni-btn-v uni-common-mt">
<button type="primary" @tap="requireTranMsg">发送"透传数据"消息</button>
</view>
<view class="uni-title uni-common-mt">透传内容</view>
<view class="uni-textarea">
<textarea v-model="tranMsg" />
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'push',
provider: [],
pushServer: 'http://demo.dcloud.net.cn/push/?',
tranMsg:''
}
},
onLoad: function () {
uni.getProvider({
service: "push",
success: (e) => {
console.log("success", e);
this.provider = e.provider;
},
fail: (e) => {
console.log("获取推送通道失败", e);
}
});
},
onUnload:function(){
this.tranMsg = ''
},
methods: {
listenTranMsg() {
// IOSreceive线click
plus.push.addEventListener('click', (msg)=> {
this.tranMsg = JSON.stringify(msg)
});
plus.push.addEventListener('receive',(msg)=>{
this.tranMsg = JSON.stringify(msg)
})
uni.showToast({
title: '开始监听透传数据',
icon: 'success'
})
},
requireTranMsg() { //
var inf = plus.push.getClientInfo();
var url = this.pushServer + 'type=tran&appid=' + encodeURIComponent(plus.runtime.appid);
inf.id && (url += '&id=' + inf.id);
url += ('&cid=' + encodeURIComponent(inf.clientid));
if (plus.os.name == 'iOS') {
url += ('&token=' + encodeURIComponent(inf.token));
}
url += ('&title=' + encodeURIComponent('Hello uniapp'));
url += ('&content=' + encodeURIComponent('带透传数据推送通知!'));
if(plus.os.name === 'iOS'){
url += ('&payload=' + encodeURIComponent('{"title":"Hello uniapp Test","content":"test content"}'));
}else{
url += ('&payload=' + encodeURIComponent('\'{"title":"Hello uniapp Test","content":"test content"}\''));
}
url += ('&version=' + encodeURIComponent(plus.runtime.version));
plus.runtime.openURL(url);
}
}
}
</script>
<style>
</style>

@ -1,106 +0,0 @@
<template>
<view class="root" :style="{backgroundImage:'url('+img+')'}">
<view :class="[show ? 'up' : '','shake-up']">
<image mode="aspectFit" src="https://web-assets.dcloud.net.cn/unidoc/zh/shakeup.png"></image>
</view>
<view :class="[show ? 'down' : '','shake-down']">
<image mode="aspectFit" src="https://web-assets.dcloud.net.cn/unidoc/zh/shakedown.png"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
img: 'https://web-assets.dcloud.net.cn/unidoc/zh/1.jpg',
show: false,
isOpened: false,
index: 1
}
},
computed:{
pageIndex() {
if (this.index === 1) {
return 'aff47ed0-517d-11eb-8ff1-d5dcf8779628'
} else if (this.index === 2) {
return '1fc36f80-5199-11eb-a16f-5b3e54966275'
} else if (this.index === 3) {
return '20a3bd60-5199-11eb-97b7-0dc4655d6e68'
} else if (this.index === 4) {
return '8b872410-51a7-11eb-8a36-ebb87efcf8c0'
} else {
return 'aff47ed0-517d-11eb-8ff1-d5dcf8779628'
}
}
},
onLoad: function () {
this.music = uni.createInnerAudioContext();
this.music.src = 'https://web-assets.dcloud.net.cn/unidoc/zh/shake.wav';
let t = null;
uni.onAccelerometerChange((res) => {
if (Math.abs(res.x) + Math.abs(res.y) + Math.abs(res.z) > 20 && !this.show && this.isOpened) {
this.music.play();
setTimeout(() => {
this.index++;
if (this.index > 4) {
this.index = 1
}
this.img = 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/' + this.pageIndex + '.jpg';
}, 2000);
this.show = true;
if (t) {
clearTimeout(t);
}
t = setTimeout(() => {
t = null;
this.show = false;
}, 600)
}
})
},
onShow() {
this.isOpened = true;
},
onUnload() {
this.show = false;
this.isOpened = false;
uni.stopAccelerometer();
this.music.destroy();
}
}
</script>
<style>
.root {
height: 100%;
display: flex;
flex-direction: column;
background-position: center center;
background-repeat: no-repeat;
}
.shake-up,
.shake-down {
height: 50%;
overflow: hidden;
transition: all .5s ease-in-out;
-webkit-transition: all .5s ease-in-out;
background: #333;
}
.up {
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
.down {
transform: translateY(50%);
-webkit-transform: translateY(50%);
}
image {
height: 100%;
width: 100%;
}
</style>

@ -1,105 +0,0 @@
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-textarea">
<textarea :value="value" placeholder="语音识别内容展示区域" disabled />
</view>
<view class="uni-common-mt uni-btn-v">
<button type="primary" @tap="startRecognize">开始语音识别</button>
<!-- <button type="primary" @tap="startRecognizeEnglish">开始语音识别英语</button> -->
</view>
</view>
</view>
</template>
<script>
import permision from "@/common/permission.js"
export default {
data() {
return {
title: 'speech',
value: ''
}
},
onUnload(){
this.value = ""
},
methods: {
async startRecognize () {
// #ifdef APP-PLUS
let status = await this.checkPermission();
if (status !== 1) {
return;
}
// #endif
// TODO ios toast
var options = {};
var that = this;
options.engine = 'baidu';
that.value = "";
plus.speech.startRecognize(options, function (s) {
console.log(s);
that.value += s;
}, function (e) {
console.log("语音识别失败:" + e.message);
});
},
async startRecognizeEnglish () {
// #ifdef APP-PLUS
let status = await this.checkPermission();
if (status !== 1) {
return;
}
// #endif
// TODO ios toast
var options = {};
var that = this;
options.engine = 'baidu';
options.lang = 'en-us';
that.value = "";
plus.speech.startRecognize(options, function (s) {
console.log(s);
that.value += s;
}, function (e) {
console.log("语音识别失败:" + e.message);
});
}
// #ifdef APP-PLUS
,
async checkPermission() {
let status = permision.isIOS ? await permision.requestIOS('record') :
await permision.requestAndroid('android.permission.RECORD_AUDIO');
if (status === null || status === 1) {
status = 1;
} else if (status === 2) {
uni.showModal({
content: "系统麦克风已关闭",
confirmText: "确定",
showCancel: false,
success: function(res) {
}
})
} else {
uni.showModal({
content: "需要麦克风权限",
confirmText: "设置",
success: function(res) {
if (res.confirm) {
permision.gotoAppSetting();
}
}
})
}
return status;
}
// #endif
}
}
</script>
<style>
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,20 +0,0 @@
@font-face {
font-family: "customicons"; /* Project id 2878519 */
src:url('/static/customicons.ttf') format('truetype');
}
.customicons {
font-family: "customicons" !important;
}
.youxi:before {
content: "\e60e";
}
.wenjian:before {
content: "\e60f";
}
.zhuanfa:before {
content: "\e610";
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

@ -1,32 +0,0 @@
@font-face {
font-family: "iconfont"; /* Project id */
src: url('@/static/iconfont.ttf') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-link:before {
content: "\e772";
}
.icon-poweroff:before {
content: "\e774";
}
.icon-safety-certificate:before {
content: "\e776";
}
.icon-chart-pie-alt:before {
content: "\e78c";
}
.icon-kongxincai:before {
content: "\e642";
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save