aleyds преди 4 години
родител
ревизия
df9324a883
променени са 2 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 2 1
      manifest.json
  2. 5 1
      pages/index/index.vue

+ 2 - 1
manifest.json

@@ -22,7 +22,8 @@
             "Push" : {},
             "Geolocation" : {},
             "Maps" : {},
-            "iBeacon" : {}
+            "iBeacon" : {},
+            "Speech" : {}
         },
         /* 应用发布信息 */
         "distribute" : {

+ 5 - 1
pages/index/index.vue

@@ -37,7 +37,7 @@
 					<u-image width="120rpx" height="120rpx" src="/static/img/index-feature-01.png"></u-image>
 					<view class="feature-item-text">签到</view>
 				</view>
-				<view class="feature-item" @click="$refs.uToast.show({title: '建设中'})">
+				<view class="feature-item" @click="speaks('贵AF113Z')">
 					<u-image width="120rpx" height="120rpx" src="/static/img/index-feature-02.png"></u-image>
 					<view class="feature-item-text">拍照取证</view>
 				</view>
@@ -80,6 +80,7 @@
 <script>
 	var ALog = uni.requireNativePlugin("AndroidLog")
 	var location = uni.requireNativePlugin("Location")
+	var speak = uni.requireNativePlugin("SpeechPlug")
 	export default {
 		data() {
 			return {
@@ -110,6 +111,9 @@
 			
 		},
 		methods: {
+			speaks(msg){
+				speak.speakAction(msg)
+			},
 			getLocation(){
 				ALog.info({msg:'请求定位'})
 				uni.getLocation({