|
@@ -29,8 +29,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="btn-box">
|
|
|
|
|
- <button class="btn">专家指导</button>
|
|
|
|
|
|
|
+ <view class="btn-box" v-if="token">
|
|
|
|
|
+ <button class="btn" @click="openExpert">专家指导</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -43,12 +43,19 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
-
|
|
|
|
|
|
|
+ token: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
|
+ this.token = options.token;
|
|
|
|
|
+ console.log(this.token);
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ openExpert(e) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `expert?token=${this.token}`
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 开始识别
|
|
* 开始识别
|
|
|
* @param {String} type 识别类型 insect:虫害,plant:病害
|
|
* @param {String} type 识别类型 insect:虫害,plant:病害
|
|
@@ -75,9 +82,9 @@
|
|
|
this.openDiscernResult(result);
|
|
this.openDiscernResult(result);
|
|
|
},
|
|
},
|
|
|
// 打开识别结果
|
|
// 打开识别结果
|
|
|
- openDiscernResult(item){
|
|
|
|
|
|
|
+ openDiscernResult(item) {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url:`discern-result?params=${JSON.stringify(item)}`
|
|
|
|
|
|
|
+ url: `discern-result?params=${JSON.stringify(item)}`
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
uploadImageSync() {
|
|
uploadImageSync() {
|