Browse Source

上传

master
前端-胡立永 5 months ago
parent
commit
83264b12c1
6 changed files with 25 additions and 14 deletions
  1. +1
    -1
      App.vue
  2. +7
    -0
      api/api.js
  3. +2
    -6
      pages_order/auth/wxLogin.vue
  4. +2
    -2
      pages_order/components/product/submitUnitSelect.vue
  5. +7
    -2
      pages_order/product/productDetail.vue
  6. +6
    -3
      store/store.js

+ 1
- 1
App.vue View File

@ -3,7 +3,7 @@
onLaunch: function() { onLaunch: function() {
}, },
onShow: function() { onShow: function() {
// this.$store.commit('initConfig')
this.$store.commit('initConfig')
this.$store.commit('getPosition') this.$store.commit('getPosition')
this.$store.commit('categoryList') this.$store.commit('categoryList')
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){


+ 7
- 0
api/api.js View File

@ -14,11 +14,18 @@ const config = {
url: '/api/getConfig', url: '/api/getConfig',
method: 'GET' method: 'GET'
}, },
// 获取客服联系电话 // 获取客服联系电话
customUser: { customUser: {
url: '/user/custom', url: '/user/custom',
method: 'get', method: 'get',
}, },
// 获取配置
getConfigOne: {
url: '/conf/one',
method: 'POST',
},
// banner列表 // banner列表
bannerList: { bannerList: {


+ 2
- 6
pages_order/auth/wxLogin.vue View File

@ -40,10 +40,10 @@
activeColor="#FD5100" activeColor="#FD5100"
:name="1" :name="1"
></uv-checkbox> ></uv-checkbox>
阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
阅读并同意我们的<text @click="$refs.popup.open('privacyXieYi')">服务协议与隐私条款</text>
</view> </view>
<view class=""> <view class="">
以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
以及<text @click="$refs.popup.open('privacyXieYi')">个人信息保护指引</text>
</view> </view>
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>
@ -75,10 +75,6 @@
this.$store.commit('login') this.$store.commit('login')
}, },
//
openConfigDetail(key){
this.$refs.popup.open(key)
},
qux(){ qux(){
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' url: '/pages/index/index'


+ 2
- 2
pages_order/components/product/submitUnitSelect.vue View File

@ -42,7 +42,7 @@
<view class="info"> <view class="info">
<view class="price"> <view class="price">
<text>{{ detail.depositPrice }}</text>
租金<text>{{ unit.price }}</text>
</view> </view>
<view class="unit"> <view class="unit">
请选择规格 请选择规格
@ -173,7 +173,7 @@
computed : { computed : {
price(){ price(){
return (this.detail.depositPrice * this.num).toFixed(2) return (this.detail.depositPrice * this.num).toFixed(2)
}
},
}, },
data() { data() {
return { return {


+ 7
- 2
pages_order/product/productDetail.vue View File

@ -16,10 +16,15 @@
</view> </view>
<view class="info-line"> <view class="info-line">
<view class="price"> <view class="price">
<text>{{ detail.depositPrice }}</text>
租金<text>
{{
detail.hotelGoodsSkuList[0] &&
detail.hotelGoodsSkuList[0].price
}}
</text>
</view> </view>
<view class="num"> <view class="num">
已售{{ detail.soldNum }}+
已售{{ detail.soldNum || 0 }}+
<image src="../static/product/like.png" mode=""></image> <image src="../static/product/like.png" mode=""></image>
</view> </view>
</view> </view>


+ 6
- 3
store/store.js View File

@ -29,15 +29,17 @@ const store = new Vuex.Store({
mutations: { mutations: {
// 初始化配置 // 初始化配置
initConfig(state){ initConfig(state){
// api('getConfig', res => {
// api('getConfigOne', res => {
// if(res.code == 200){ // if(res.code == 200){
// state.configList = res.result // state.configList = res.result
// } // }
// }) // })
let config = ['getPrivacyPolicy', 'getUserAgreement']
let config = ['privacyXieYi']
config.forEach(k => { config.forEach(k => {
api(k, res => {
api('getConfigOne', {
name : k
},res => {
if (res.code == 200) { if (res.code == 200) {
state.configList[k] = res.result state.configList[k] = res.result
} }
@ -178,6 +180,7 @@ const store = new Vuex.Store({
if(r.confirm){ if(r.confirm){
state.userInfo = {} state.userInfo = {}
state.shop = false state.shop = false
state.bindShop = {}
uni.removeStorageSync('token') uni.removeStorageSync('token')
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/index' url: '/pages/index/index'


Loading…
Cancel
Save