调整我的页面,调整手动绑定字段错误和接口调用的错误
This commit is contained in:
parent
bcaefbe1cb
commit
293a5c8682
18
app.js
18
app.js
@ -1,14 +1,32 @@
|
|||||||
import { checkUpgrade, getConfigByEnv } from "./utils/index"
|
import { checkUpgrade, getConfigByEnv } from "./utils/index"
|
||||||
|
|
||||||
|
function share() {
|
||||||
|
wx.onAppRoute(function(res) {
|
||||||
|
const pages = getCurrentPages()
|
||||||
|
const view = pages[pages.length - 1];
|
||||||
|
if (view) {
|
||||||
|
wx.showShareMenu()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// app.js
|
// app.js
|
||||||
App({
|
App({
|
||||||
onShow() {
|
onShow() {
|
||||||
checkUpgrade();
|
checkUpgrade();
|
||||||
},
|
},
|
||||||
onLaunch() {
|
onLaunch() {
|
||||||
|
// wx.showShareMenu()
|
||||||
|
// share()
|
||||||
const { api } = getConfigByEnv();
|
const { api } = getConfigByEnv();
|
||||||
this.globalData = { ...this.globalData, api, }
|
this.globalData = { ...this.globalData, api, }
|
||||||
},
|
},
|
||||||
|
// onShareAppMessage:function(){
|
||||||
|
// wx.showShareMenu({
|
||||||
|
// withShareTicket:true,
|
||||||
|
// menu:['shareAppMessage','shareTimeline']
|
||||||
|
// })
|
||||||
|
// },
|
||||||
globalData: {
|
globalData: {
|
||||||
primaryColor: '#52c41a'
|
primaryColor: '#52c41a'
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
@ -17,9 +17,11 @@
|
|||||||
<view class="userLevel"> {{ item.level }} </view>
|
<view class="userLevel"> {{ item.level }} </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="synopsis"> {{item.synopsis}}{{item.synopsis}} {{item.synopsis}} </view>
|
<view class="synopsis"> {{item.synopsis}}{{item.synopsis}} {{item.synopsis}} </view>
|
||||||
<view class="connect" catch:tap="consult" data-id="{{item.id}}">
|
<view class="connect" >
|
||||||
<van-icon name="service-o" color="#1989fa" />
|
<view style="display: flex; align-items: center;" catch:tap="consult" data-id="{{item.id}}">
|
||||||
<view style="margin-left: 10rpx;color: #1989fa;"> 在线咨询 </view>
|
<van-icon name="service-o" color="#1989fa" />
|
||||||
|
<view style="margin-left: 10rpx;color: #1989fa;"> 在线咨询 </view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getParkList } from "../../service/park"
|
import { getLoginParkList } from "../../service/park"
|
||||||
import { getParkSimpleMeterList } from "../../service/meter"
|
import { getParkSimpleMeterList } from "../../service/meter"
|
||||||
import { alertInfo } from "../../utils/index";
|
import { alertInfo } from "../../utils/index";
|
||||||
import request from "../../utils/request"
|
import request from "../../utils/request"
|
||||||
@ -93,7 +93,7 @@ Component({
|
|||||||
},
|
},
|
||||||
async onSearchPark() {
|
async onSearchPark() {
|
||||||
const { searchText = "" } = this.data;
|
const { searchText = "" } = this.data;
|
||||||
const { code, message, data: parks = [] } = await getParkList({keyword: searchText});
|
const { code, message, data: parks = [] } = await getLoginParkList({keyword: searchText});
|
||||||
if (code !== OK) {
|
if (code !== OK) {
|
||||||
alertInfo(message)
|
alertInfo(message)
|
||||||
return
|
return
|
||||||
@ -123,7 +123,7 @@ Component({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
columns: data?.map(item => item?.name),
|
columns: data?.map(item => item?.shortName),
|
||||||
list: data,
|
list: data,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<van-field
|
<van-field
|
||||||
required
|
required
|
||||||
value="{{ tenementName }}"
|
value="{{ tenementName }}"
|
||||||
label="园区"
|
label="商户"
|
||||||
placeholder="请选择商户"
|
placeholder="请选择商户"
|
||||||
border="{{ true }}"
|
border="{{ true }}"
|
||||||
readonly
|
readonly
|
||||||
|
@ -13,18 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20rpx;border-radius: 16rpx; overflow: hidden;">
|
<view style="margin-bottom: 20rpx;border-radius: 16rpx; overflow: hidden;">
|
||||||
<van-grid column-num="3" >
|
<van-grid column-num="3" >
|
||||||
<van-grid-item
|
|
||||||
bind:click="jumpToFinance"
|
|
||||||
use-slot
|
|
||||||
>
|
|
||||||
<van-image
|
|
||||||
style="margin-top: 20rpx;"
|
|
||||||
width="140rpx"
|
|
||||||
height="140rpx"
|
|
||||||
src="/assets/images/finance.png"
|
|
||||||
/>
|
|
||||||
<view style="margin-top: 20rpx;font-size: 34rpx;"> 财税援助 </view>
|
|
||||||
</van-grid-item>
|
|
||||||
<van-grid-item
|
<van-grid-item
|
||||||
bind:click="jumpToLaw"
|
bind:click="jumpToLaw"
|
||||||
use-slot
|
use-slot
|
||||||
@ -37,6 +26,18 @@
|
|||||||
/>
|
/>
|
||||||
<view style="margin-top: 20rpx;font-size: 34rpx;"> 法律援助 </view>
|
<view style="margin-top: 20rpx;font-size: 34rpx;"> 法律援助 </view>
|
||||||
</van-grid-item>
|
</van-grid-item>
|
||||||
|
<van-grid-item
|
||||||
|
bind:click="jumpToFinance"
|
||||||
|
use-slot
|
||||||
|
>
|
||||||
|
<van-image
|
||||||
|
style="margin-top: 20rpx;"
|
||||||
|
width="140rpx"
|
||||||
|
height="140rpx"
|
||||||
|
src="/assets/images/finance.png"
|
||||||
|
/>
|
||||||
|
<view style="margin-top: 20rpx;font-size: 34rpx;"> 财税援助 </view>
|
||||||
|
</van-grid-item>
|
||||||
<van-grid-item
|
<van-grid-item
|
||||||
bind:click="jumpToEncyclopedia"
|
bind:click="jumpToEncyclopedia"
|
||||||
use-slot
|
use-slot
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="th" style="width: 200rpx"> {{ item.tenement.shortName }} </view>
|
<view class="th" style="width: 200rpx"> {{ item.tenement.shortName }} </view>
|
||||||
<view class="th" style="width: 200rpx"> {{ item.address }} </view>
|
<view class="th" style="width: 200rpx"> {{ item.address }} </view>
|
||||||
<view class="th" style="width: 150rpx"> {{ item.amount }} </view>
|
<view class="th" style="width: 150rpx"> {{ item.money }} </view>
|
||||||
<view class="th" style="width: 130rpx" wx:if="{{item.onPosition}}">
|
<view class="th" style="width: 130rpx" wx:if="{{item.onPosition}}">
|
||||||
<van-tag type="warning">拉闸</van-tag>
|
<van-tag type="warning">拉闸</van-tag>
|
||||||
</view>
|
</view>
|
||||||
|
@ -45,9 +45,9 @@ export function getConfigByEnv() {
|
|||||||
switch (envVersion) {
|
switch (envVersion) {
|
||||||
// 开发版
|
// 开发版
|
||||||
case 'develop':
|
case 'develop':
|
||||||
api = "http://localhost:8000"
|
// api = "http://localhost:8000"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
// api = "https://zgd.hbhcbn.com/api3"
|
||||||
|
api = "https://zgd.hbhcbn.com/api3"
|
||||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
// api = "https://zgd.hbhcbn.com/wxApi"
|
||||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||||
break;
|
break;
|
||||||
|
@ -84,7 +84,7 @@ const parseResponse = function (response, url) {
|
|||||||
}
|
}
|
||||||
const { statusCode } = response;
|
const { statusCode } = response;
|
||||||
if (!statusCode) {
|
if (!statusCode) {
|
||||||
alertError("服务异常")
|
alertError("服务错误")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log('url', url,'statusCode', statusCode, 'response.data', response?.data)
|
console.log('url', url,'statusCode', statusCode, 'response.data', response?.data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user