帮助中心

dev
zhouzhenyuan 10 months ago
parent 85ee5bb05d
commit 26d52368a2
  1. 16
      pages.json
  2. 56
      pages/goods/detail.vue
  3. 38
      pages/news/rules/index.vue
  4. 55
      pages/news/rules/rulesList.vue
  5. 14
      pages/news1/help.vue
  6. 43
      pages/sureOrder/index.vue

@ -512,6 +512,22 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "rules/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "rules/rulesList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{ {
"path": "article/detail", "path": "article/detail",
"style": { "style": {

@ -20,19 +20,6 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- <scroll-view class="goods" scroll-x="true" @scroll="scroll">
<view class="goodsItem" v-for="(item,index) in goods.goods_images" :key="index">
<image :src="item.preview_url" mode="" class="goodsImg"></image>
<view class="num">
<view class="numSp">
</view>
<view class="numInfo">
{{index+1}}/{{allPicture}}
</view>
</view>
</view>
</scroll-view> -->
</view> </view>
</view> </view>
@ -74,8 +61,8 @@
{{goods.goods_name}} {{goods.goods_name}}
</view> </view>
<view class="goodsOpera"> <view class="goodsOpera">
<view class="goodsNum" @click="copyNum" v-if="goods.skuList.length>0"> <view class="goodsNum" @click="copyNum" >
<text>{{goods.skuList[0].goods_sku_no}}</text> <text>{{goods.skuList[0].goods_sku_id}}</text>
<image src="/static/detail/copy.png" mode=""></image> <image src="/static/detail/copy.png" mode=""></image>
</view> </view>
<view class="operaImg"> <view class="operaImg">
@ -103,7 +90,7 @@
<image src="../../static/detail/rightIcon.png" mode=""></image> <image src="../../static/detail/rightIcon.png" mode=""></image>
</view> </view>
<view class="address"> <view class="address">
河北省秦皇岛市某某区 {{}}
</view> </view>
</view> </view>
</view> </view>
@ -295,6 +282,7 @@
import * as GoodsApi from '@/api/goods' import * as GoodsApi from '@/api/goods'
import * as goodsCar from '@/api/cart.js' import * as goodsCar from '@/api/cart.js'
import SkuPopup from './components/SkuPopup' import SkuPopup from './components/SkuPopup'
import * as address from '@/api/address.js'
export default { export default {
components: { components: {
SkuPopup SkuPopup
@ -314,7 +302,8 @@
goods: {}, goods: {},
suggestGoodsList: [], suggestGoodsList: [],
userInfo: {}, userInfo: {},
addressList:[],
addressInfo:{},
} }
}, },
onLoad(options) { onLoad(options) {
@ -322,11 +311,42 @@
this.getGoodsDetail(options.goodsId) this.getGoodsDetail(options.goodsId)
}, },
onShow() { onShow() {
this.getAddressList()
this.getSuggestGoods() this.getSuggestGoods()
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo');
}, },
methods: { methods: {
// //
getAddressList(){
const that = this
return new Promise((resolve, reject) => {
address.list().then(res => {
if (res.code == 200) {
that.addressList = res.data.list
console.log('58555559999')
that.getDefaultAddress()
}
})
.catch()
})
},
getDefaultAddress() {
console.log('5855555')
const that = this
return new Promise((resolve, reject) => {
address.defaultId().then(res => {
if (res.code == 200) {
for (var i = 0; i < that.addressList.length; i++) {
if (res.data.defaultId == that.addressList[i].address_id) {
that.addressInfo = that.addressList[i]
}
}
}
})
.catch()
})
},
choseSku() { choseSku() {
this.showSkuPopup = true this.showSkuPopup = true
}, },

@ -0,0 +1,38 @@
<template>
<view class="pages">
<view class="header">
<u-navbar is-back="false" :title="title" ></u-navbar>
</view>
<view class="content">
<rich-text :nodes="strings"></rich-text>
</view>
</view>
</template>
<script>
export default{
data(){
return{
title:'',
strings:'',
itemInfo:{}
}
},
onLoad(options){
this.itemInfo = JSON.parse(options.itemInfo)
this.title = this.itemInfo.title;
this.strings = this.itemInfo.content;
},
methods:{
},
}
</script>
<style scoped lang="scss">
.pages{
width: 100%;
height: 100%;
padding: 30rpx;
}
</style>

@ -0,0 +1,55 @@
<template>
<view class="pages">
<view class="header">
<u-navbar is-back="false" :title="title" ></u-navbar>
</view>
<view class="content">
<view v-for="(item,index) in list" :key="index" class="item">
<view class="title" @click="goRules(item)">
{{item.title}}
</view>
<u-line />
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
title:'',
list:[],
itemInfo:{}
}
},
onLoad(options){
this.itemInfo = JSON.parse(options.itemInfo)
this.title = this.itemInfo.name
this.list = this.itemInfo.child
},
methods:{
goRules(item){
uni.navigateTo({
url:'/pages/news/rules/index?itemInfo='+JSON.stringify(item)
})
}
}
}
</script>
<style scoped lang="scss">
.pages{
width: 100%;
height: 100%;
padding: 30rpx;
}
.item{
margin-bottom: 28rpx;
}
.title{
margin-bottom: 28rpx;
}
</style>

@ -3,7 +3,7 @@
<view class="helpContent"> <view class="helpContent">
<view class="helpTitle">帮助中心</view> <view class="helpTitle">帮助中心</view>
<view class="helpItem" v-for="(item,index) in itemList" :key="index"> <view class="helpItem" v-for="(item,index) in itemList" :key="index">
<view class="helpMain"> <view class="helpMain" @click="goListPage(item)">
<u-icon name="arrow-left" class="zhishi" color="#dfdbdb" size="28"></u-icon> <u-icon name="arrow-left" class="zhishi" color="#dfdbdb" size="28"></u-icon>
<image :src="item.img_url" class="titleIcon" mode="widthFix"></image> <image :src="item.img_url" class="titleIcon" mode="widthFix"></image>
<view class="mainText"> <view class="mainText">
@ -47,6 +47,11 @@
this.getHelpList() this.getHelpList()
}, },
methods: { methods: {
goListPage(item){
uni.navigateTo({
url:'/pages/news/rules/rulesList?itemInfo='+JSON.stringify(item)
})
},
getHelpList() { getHelpList() {
const that = this const that = this
help.helpList() help.helpList()
@ -59,8 +64,11 @@
.finally(() => that.isLoading = false) .finally(() => that.isLoading = false)
}, },
openContent(item) { openContent(item) {
this.strings = item.content uni.navigateTo({
this.dialog = true url:'/pages/news/rules/index?itemInfo='+JSON.stringify(item)
})
// this.strings = item.content
// this.dialog = true
}, },
} }
} }

@ -5,14 +5,16 @@
:background="background"></u-navbar> :background="background"></u-navbar>
</view> </view>
<view class="buyType"> <view class="buyType">
<view class="toDoor" :style="{'background':buyType=='sm'?'#fff':'rgba(255, 255, 255, 0.57)'}"> <view class="toDoor" @click="choseType('sm')"
:style="{'background':buyType=='sm'?'#fff':'rgba(255, 255, 255, 0.57)','height':buyType=='zq'?'88rpx':'78rpx'}">
送货上门 送货上门
</view> </view>
<view class="bySelf"> <view class="bySelf" @click="choseType('zq')"
:style="{'background':buyType=='zq'?'#fff':'rgba(255, 255, 255, 0.57)','height':buyType=='zq'?'88rpx':'78rpx'}">
到店自取 到店自取
</view> </view>
</view> </view>
<view class="address" v-if="buyType"> <view class="address" v-if="buyType!='sm'">
<view class="addAddress"> <view class="addAddress">
请点击添加收货地址 请点击添加收货地址
</view> </view>
@ -240,34 +242,37 @@
export default { export default {
data() { data() {
return { return {
buyType: false, buyType: 'sm',
background: { background: {
background: 'url(' + img + ') center top no-repeat', background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto', backgroundSize: '100% auto',
}, },
goodsInfo: {}, goodsInfo: {},
shopInfo:{}, shopInfo: {},
addressList:[], addressList: [],
addressInfo:{} addressInfo: {}
} }
}, },
onLoad(options) { onLoad(options) {
if(options.goodsInfo){ if (options.goodsInfo) {
this.goodsInfo = JSON.parse(options.goodsInfo) this.goodsInfo = JSON.parse(options.goodsInfo)
} }
}, },
onShow() { onShow() {
this.getGoodsInfo() this.getGoodsInfo()
this.getAddressList(); this.getAddressList();
}, },
methods: { methods: {
getDefaultAddress(){ choseType(val) {
this.buyType = val
},
getDefaultAddress() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
address.defaultId().then(res => { address.defaultId().then(res => {
if(res.code==200){ if (res.code == 200) {
for(var i=0;i<that.addressList.length;i++){ for (var i = 0; i < that.addressList.length; i++) {
if(res.data.defaultId==that.addressList[i].address_id){ if (res.data.defaultId == that.addressList[i].address_id) {
that.addressInfo = that.addressList[i] that.addressInfo = that.addressList[i]
that.getOrderInfo() that.getOrderInfo()
} }
@ -277,11 +282,11 @@
.catch() .catch()
}) })
}, },
getOrderInfo(){ getOrderInfo() {
const that = this const that = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
address.list().then(res => { address.list().then(res => {
if(res.code==200){ if (res.code == 200) {
that.addressList = res.data.list that.addressList = res.data.list
that.getDefaultAddress() that.getDefaultAddress()
} }
@ -289,11 +294,11 @@
.catch() .catch()
}) })
}, },
getAddressList(){ getAddressList() {
const that = this const that = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
address.list().then(res => { address.list().then(res => {
if(res.code==200){ if (res.code == 200) {
that.addressList = res.data.list that.addressList = res.data.list
that.getDefaultAddress() that.getDefaultAddress()
} }
@ -304,11 +309,11 @@
getGoodsInfo() { getGoodsInfo() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
storeShop.list().then(res => { storeShop.list().then(res => {
console.log(res,'获取店铺信息') console.log(res, '获取店铺信息')
}) })
.catch() .catch()
}) })
}, },
orderSubmit() { orderSubmit() {
const that = this const that = this

Loading…
Cancel
Save