帮助中心

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. 39
      pages/sureOrder/index.vue

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

@ -20,19 +20,6 @@
</swiper-item>
</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>
@ -74,8 +61,8 @@
{{goods.goods_name}}
</view>
<view class="goodsOpera">
<view class="goodsNum" @click="copyNum" v-if="goods.skuList.length>0">
<text>{{goods.skuList[0].goods_sku_no}}</text>
<view class="goodsNum" @click="copyNum" >
<text>{{goods.skuList[0].goods_sku_id}}</text>
<image src="/static/detail/copy.png" mode=""></image>
</view>
<view class="operaImg">
@ -103,7 +90,7 @@
<image src="../../static/detail/rightIcon.png" mode=""></image>
</view>
<view class="address">
河北省秦皇岛市某某区
{{}}
</view>
</view>
</view>
@ -295,6 +282,7 @@
import * as GoodsApi from '@/api/goods'
import * as goodsCar from '@/api/cart.js'
import SkuPopup from './components/SkuPopup'
import * as address from '@/api/address.js'
export default {
components: {
SkuPopup
@ -314,7 +302,8 @@
goods: {},
suggestGoodsList: [],
userInfo: {},
addressList:[],
addressInfo:{},
}
},
onLoad(options) {
@ -322,11 +311,42 @@
this.getGoodsDetail(options.goodsId)
},
onShow() {
this.getAddressList()
this.getSuggestGoods()
this.userInfo = uni.getStorageSync('userInfo')
this.userInfo = uni.getStorageSync('userInfo');
},
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() {
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="helpTitle">帮助中心</view>
<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>
<image :src="item.img_url" class="titleIcon" mode="widthFix"></image>
<view class="mainText">
@ -47,6 +47,11 @@
this.getHelpList()
},
methods: {
goListPage(item){
uni.navigateTo({
url:'/pages/news/rules/rulesList?itemInfo='+JSON.stringify(item)
})
},
getHelpList() {
const that = this
help.helpList()
@ -59,8 +64,11 @@
.finally(() => that.isLoading = false)
},
openContent(item) {
this.strings = item.content
this.dialog = true
uni.navigateTo({
url:'/pages/news/rules/index?itemInfo='+JSON.stringify(item)
})
// this.strings = item.content
// this.dialog = true
},
}
}

@ -5,14 +5,16 @@
:background="background"></u-navbar>
</view>
<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 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 class="address" v-if="buyType">
<view class="address" v-if="buyType!='sm'">
<view class="addAddress">
请点击添加收货地址
</view>
@ -240,19 +242,19 @@
export default {
data() {
return {
buyType: false,
buyType: 'sm',
background: {
background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100% auto',
},
goodsInfo: {},
shopInfo:{},
addressList:[],
addressInfo:{}
shopInfo: {},
addressList: [],
addressInfo: {}
}
},
onLoad(options) {
if(options.goodsInfo){
if (options.goodsInfo) {
this.goodsInfo = JSON.parse(options.goodsInfo)
}
},
@ -262,12 +264,15 @@
},
methods: {
getDefaultAddress(){
choseType(val) {
this.buyType = val
},
getDefaultAddress() {
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){
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]
that.getOrderInfo()
}
@ -277,11 +282,11 @@
.catch()
})
},
getOrderInfo(){
getOrderInfo() {
const that = this
return new Promise((resolve, reject) => {
address.list().then(res => {
if(res.code==200){
if (res.code == 200) {
that.addressList = res.data.list
that.getDefaultAddress()
}
@ -289,11 +294,11 @@
.catch()
})
},
getAddressList(){
getAddressList() {
const that = this
return new Promise((resolve, reject) => {
address.list().then(res => {
if(res.code==200){
if (res.code == 200) {
that.addressList = res.data.list
that.getDefaultAddress()
}
@ -304,7 +309,7 @@
getGoodsInfo() {
return new Promise((resolve, reject) => {
storeShop.list().then(res => {
console.log(res,'获取店铺信息')
console.log(res, '获取店铺信息')
})
.catch()
})

Loading…
Cancel
Save