|
@@ -26,7 +26,7 @@
|
|
|
</view>
|
|
|
<view class="tree-name">
|
|
|
<view>{{treeName}}</view>
|
|
|
- <image @click="handleEditName" class="edit-icon" :src="`${config.BASIC_IMG}img/edit-icon.png`">
|
|
|
+ <image v-if="userInfo.tel" @click="handleEditName" class="edit-icon" :src="`${config.BASIC_IMG}img/edit-icon.png`">
|
|
|
</image>
|
|
|
</view>
|
|
|
<image class="drone-icon" :src="`${config.BASIC_IMG}img/treePage/drone-icon.png`"></image>
|
|
@@ -112,7 +112,8 @@
|
|
|
|
|
|
const name = ref('荔枝')
|
|
|
const showPicker = ref(false)
|
|
|
- const columns = ref([]);
|
|
|
+ const columns = ref([]);
|
|
|
+ const speciesId = ref('')
|
|
|
const handleShow = () => {
|
|
|
showPicker.value = true
|
|
|
}
|
|
@@ -120,7 +121,8 @@
|
|
|
showPicker.value = false
|
|
|
}
|
|
|
const handleConfirm = (e) => {
|
|
|
- name.value = e.value[0].name
|
|
|
+ name.value = e.value[0].name
|
|
|
+ speciesId.value = e.value[0].speciesId
|
|
|
handleCancel()
|
|
|
}
|
|
|
|
|
@@ -181,10 +183,9 @@
|
|
|
const userInfo = ref({})
|
|
|
|
|
|
onLoad(() => {
|
|
|
- userInfo.value = uni.getStorageSync('userInfo')
|
|
|
+ userInfo.value = uni.getStorageSync('userInfo')
|
|
|
featchIsLookedGuide()
|
|
|
featchCategoryList()
|
|
|
- featchLightTree()
|
|
|
})
|
|
|
|
|
|
onShow(()=>{
|
|
@@ -192,7 +193,8 @@
|
|
|
if(isUpdateName === 'true'){
|
|
|
featchLightTree()
|
|
|
uni.setStorageSync('isUpdateName','false')
|
|
|
- }
|
|
|
+ }
|
|
|
+ featchSessionStore()
|
|
|
// 页面显示时启动弹幕
|
|
|
startDanmaku()
|
|
|
})
|
|
@@ -212,7 +214,9 @@
|
|
|
TREE.categoryList().then(({
|
|
|
data
|
|
|
}) => {
|
|
|
- columns.value[0] = data || []
|
|
|
+ columns.value[0] = data || []
|
|
|
+ speciesId.value = data[0].speciesId
|
|
|
+ featchLightTree()
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -244,18 +248,23 @@
|
|
|
if(data?.text === 'orderSuccess'){
|
|
|
clockinType.value = 4
|
|
|
showSuccess.value = !showSuccess.value
|
|
|
+ treeSetSessionStore()
|
|
|
}else{
|
|
|
if (data?.val == 0) {
|
|
|
- showGuardSuccess.value = !showGuardSuccess.value
|
|
|
- USER.setSessionStore({
|
|
|
- key: 'successTree',
|
|
|
- miniUserId: userInfo.value.id,
|
|
|
- val:1,
|
|
|
- text:''
|
|
|
- })
|
|
|
+ showGuardSuccess.value = !showGuardSuccess.value
|
|
|
+ treeSetSessionStore()
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}))
|
|
|
+ }
|
|
|
+
|
|
|
+ const treeSetSessionStore = () =>{
|
|
|
+ USER.setSessionStore({
|
|
|
+ key: 'successTree',
|
|
|
+ miniUserId: userInfo.value.id,
|
|
|
+ val:1,
|
|
|
+ text:'1'
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const closedCheckPopup = () =>{
|
|
@@ -264,10 +273,10 @@
|
|
|
|
|
|
const sampleId = ref('')
|
|
|
//通过品类查询当前树
|
|
|
- const featchLightTree = () =>{
|
|
|
- TREE.getLightTree({farmId:766}).then((res =>{
|
|
|
- sampleId.value = res.data.id
|
|
|
- getBySampleId()
|
|
|
+ const featchLightTree = () =>{
|
|
|
+ TREE.getLightTreeList().then((res =>{
|
|
|
+ sampleId.value = res.data[0].sampleId
|
|
|
+ getBySampleId()
|
|
|
}))
|
|
|
}
|
|
|
|