调整我的页面,调整手动绑定字段错误和接口调用的错误
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"
|
||||
|
||||
function share() {
|
||||
wx.onAppRoute(function(res) {
|
||||
const pages = getCurrentPages()
|
||||
const view = pages[pages.length - 1];
|
||||
if (view) {
|
||||
wx.showShareMenu()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// app.js
|
||||
App({
|
||||
onShow() {
|
||||
checkUpgrade();
|
||||
},
|
||||
onLaunch() {
|
||||
// wx.showShareMenu()
|
||||
// share()
|
||||
const { api } = getConfigByEnv();
|
||||
this.globalData = { ...this.globalData, api, }
|
||||
},
|
||||
// onShareAppMessage:function(){
|
||||
// wx.showShareMenu({
|
||||
// withShareTicket:true,
|
||||
// menu:['shareAppMessage','shareTimeline']
|
||||
// })
|
||||
// },
|
||||
globalData: {
|
||||
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>
|
||||
<view class="synopsis"> {{item.synopsis}}{{item.synopsis}} {{item.synopsis}} </view>
|
||||
<view class="connect" catch:tap="consult" data-id="{{item.id}}">
|
||||
<van-icon name="service-o" color="#1989fa" />
|
||||
<view style="margin-left: 10rpx;color: #1989fa;"> 在线咨询 </view>
|
||||
<view class="connect" >
|
||||
<view style="display: flex; align-items: center;" catch:tap="consult" data-id="{{item.id}}">
|
||||
<van-icon name="service-o" color="#1989fa" />
|
||||
<view style="margin-left: 10rpx;color: #1989fa;"> 在线咨询 </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 { alertInfo } from "../../utils/index";
|
||||
import request from "../../utils/request"
|
||||
|
@ -93,7 +93,7 @@ Component({
|
|||
},
|
||||
async onSearchPark() {
|
||||
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) {
|
||||
alertInfo(message)
|
||||
return
|
||||
|
@ -123,7 +123,7 @@ Component({
|
|||
return
|
||||
}
|
||||
this.setData({
|
||||
columns: data?.map(item => item?.name),
|
||||
columns: data?.map(item => item?.shortName),
|
||||
list: data,
|
||||
})
|
||||
},
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<van-field
|
||||
required
|
||||
value="{{ tenementName }}"
|
||||
label="园区"
|
||||
label="商户"
|
||||
placeholder="请选择商户"
|
||||
border="{{ true }}"
|
||||
readonly
|
||||
|
|
|
@ -13,18 +13,7 @@
|
|||
</view>
|
||||
<view style="margin-bottom: 20rpx;border-radius: 16rpx; overflow: hidden;">
|
||||
<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
|
||||
bind:click="jumpToLaw"
|
||||
use-slot
|
||||
|
@ -37,6 +26,18 @@
|
|||
/>
|
||||
<view style="margin-top: 20rpx;font-size: 34rpx;"> 法律援助 </view>
|
||||
</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
|
||||
bind:click="jumpToEncyclopedia"
|
||||
use-slot
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</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: 150rpx"> {{ item.amount }} </view>
|
||||
<view class="th" style="width: 150rpx"> {{ item.money }} </view>
|
||||
<view class="th" style="width: 130rpx" wx:if="{{item.onPosition}}">
|
||||
<van-tag type="warning">拉闸</van-tag>
|
||||
</view>
|
||||
|
|
|
@ -45,9 +45,9 @@ export function getConfigByEnv() {
|
|||
switch (envVersion) {
|
||||
// 开发版
|
||||
case 'develop':
|
||||
api = "http://localhost:8000"
|
||||
// api = "https://zgd.hbhcbn.com/api3"
|
||||
// api = "http://localhost:8000"
|
||||
// api = "https://zgd.hbhcbn.com/api3"
|
||||
api = "https://zgd.hbhcbn.com/api3"
|
||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||
break;
|
||||
|
|
|
@ -84,7 +84,7 @@ const parseResponse = function (response, url) {
|
|||
}
|
||||
const { statusCode } = response;
|
||||
if (!statusCode) {
|
||||
alertError("服务异常")
|
||||
alertError("服务错误")
|
||||
return
|
||||
}
|
||||
console.log('url', url,'statusCode', statusCode, 'response.data', response?.data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user