已对接6个接口

准备回复订单详情页面
This commit is contained in:
xk_guohonglei
2020-08-22 09:55:17 +08:00
parent 85e6ba710e
commit b68df95618
24 changed files with 4443 additions and 234 deletions

View File

@@ -19,13 +19,13 @@
<view class="cu-list ">
<view class="cu-item padding-sm ">
<view class="text-bold color-333 text-xl">
九龙路加油站
{{site.oilSiteName}}
</view>
<view class="color-999">
九龙路1188号
{{site.address}}
</view>
<view class="color-333 padding-top-xs">
联系方式战三13263967686
联系方式{{site.linkMan}}{{site.phone}}
</view>
</view>
</view>
@@ -34,15 +34,13 @@
</view>
</view>
<view class="margin margin-bottom-0 padding-bottom my-bg">
<OilMenuItem />
<OilMenuItem />
<OilMenuItem />
<OilMenuItem />
<OilMenuItem :oilItem="item" v-for="(item,index) in oilList" :key="index" />
</view>
</view>
</template>
<script>
import cloudSiteApi from '@/api/cloud-site.js'
import OilMenuItem from '@/components/oil-menu-item.vue'
export default {
components: {
@@ -51,6 +49,7 @@
data() {
return {
title: 'Hello',
site: {},
cuIconList: [{
cuIcon: 'location',
color: 'red',
@@ -86,78 +85,28 @@
color: 'red',
badge: 0,
name: '员工管理'
}
},
]
};
],
oilList: []
}
},
onLoad() {
this.getSiteInfo()
},
onLoad() {},
methods: {
thirdAdd() {
uni.chooseAddress({
success(res) {
console.log(res.userName)
console.log(res.postalCode)
console.log(res.provinceName)
console.log(res.cityName)
console.log(res.countyName)
console.log(res.detailInfo)
console.log(res.nationalCode)
console.log(res.telNumber)
}
})
},
scanQr() {
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
uni.vibrate({
success: function() {
console.log('success');
}
getSiteInfo() {
cloudSiteApi.getSiteDetail().then(res => {
console.log('...', res)
if (res.code === 20000) {
this.site = res.data.site
this.oilList = res.data.oil
uni.setStorage({
key:'oilSiteName',
data:res.data.site.oilSiteName
})
}
})
},
copy() {
uni.setClipboardData({
data: 'lallalala',
success() {
uni.showToast({
title: '复制成功',
position: 'bottom',
icon: 'none'
})
}
})
},
toAuth() {
uni.navigateTo({
url: '/pages/authentication/authForm/authForm'
})
},
toQrcode() {
uni.navigateTo({
url: '/pages/qrcode/qrcodeList/qrcodeList'
});
},
routerTo(url) {
uni.navigateTo({
url: url
});
},
toLogin() {
uni.navigateTo({
url: 'pages/login/login'
});
},
// 拨打电话
makeCall() {
uni.makePhoneCall({
phoneNumber: '4008-56-5355' //仅为示例
})
}
}
};