|
@@ -8,10 +8,7 @@
|
|
|
name="stop-circle-o"
|
|
|
@click="record"
|
|
|
/>
|
|
|
-
|
|
|
- <van-uploader :max-count="1" accept="image" @after-read="getImage">
|
|
|
- <a class="a-xc">相册</a>
|
|
|
- </van-uploader>
|
|
|
+ <a class="a-xc" @click="navToalbum">相册</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -30,9 +27,19 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- getImage(event) {
|
|
|
- console.log("选择的相片信息:" + event.detail.file.url);
|
|
|
- this.$navigator.push("detail?file=" + event.detail.file.url);
|
|
|
+
|
|
|
+ //打开相册选取
|
|
|
+ navToalbum() {
|
|
|
+ var that = this;
|
|
|
+ wx.chooseImage({
|
|
|
+ count: 1,
|
|
|
+ sizeType: ["original", "compressed"],
|
|
|
+ sourceType: ["album"],
|
|
|
+ success(res) {
|
|
|
+ console.log("所选相片路径:" + res.tempFilePaths);
|
|
|
+ that.$navigator.push("detail?file=" + res.tempFilePaths);
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|